create-nodejs-express
Version:
A package for creating a folder structure for nodejs/express application
22 lines (19 loc) • 589 B
JavaScript
module.exports = `const express = require('express');
const router = express.Router();
router.route('/')
.get((req, res) => {
res.status(200).json({
success: true,
message: "App is running Yaaaaye 🔥",
url: req.originalUrl,
path: req.route.path,
host: req.hostname,
fresh: req.fresh,
method: req.method,
protocol: req.protocol,
secure: req.secure,
ip: req.ip,
ips: req.ips,
})
})
module.exports = router;`;