Fixed res.SECRET issue

This commit is contained in:
Jyotirmoy Bandyopadhayaya 2022-01-29 11:54:55 +05:30
parent 0bc9cd7ad5
commit 653dd08052
4 changed files with 4 additions and 7 deletions

View File

@ -1 +1,2 @@
MONGO_DB=mongo-uri
MONGO_DB=mongo-uri
SECRET=

View File

@ -1,3 +1,3 @@
module.exports.home = function (req, res) {
return res.send("welcome to home page");
return res.send("URL MiniFy is running");
};

View File

@ -18,6 +18,7 @@ app.use(
// TODO change the secret before deployment secret need to be proper key for now we put some random text
saveUninitialized: false,
resave: false,
secret: process.env.SECRET,
cookie: {
maxAge: 1000 * 60 * 30,
},

View File

@ -2,12 +2,7 @@ const express = require("express");
const router = express.Router();
const homeController = require("../controllers/home_controller");
const test = async (req, res) => {
console.log("🚀 ~test ~ running.........");
return res.send("Running");
};
router.get("/test", test);
router.get("/", homeController.home);
module.exports = router;