diff --git a/.gitignore b/.gitignore index 3040c84..c188db4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/* .env to-dos.txt /seeds/NO_PICTURE.jpg -/seeds/seeds_to_mongoAtlas.json \ No newline at end of file +/seeds/seeds_to_mongoAtlas.json +to fix.bmp \ No newline at end of file diff --git a/app.js b/app.js index 2ad6bc4..5f28a2f 100644 --- a/app.js +++ b/app.js @@ -26,8 +26,8 @@ const MongoStore = require('connect-mongo'); const port = process.env.PORT || 3000; const secret = process.env.SECRET || "TheGemLettuceIsHidden"; -// const dbUrl = process.env.DB_URL || "mongodb://localhost:27017/sweetApp"; -const dbUrl = "mongodb://localhost:27017/sweetApp"; +const dbUrl = process.env.DB_URL || "mongodb://localhost:27017/sweetApp"; +// const dbUrl = "mongodb://localhost:27017/sweetApp"; main().catch((err) => { console.log( "#####################################MONGO CONNECTION ERROR!##############################################" @@ -121,6 +121,7 @@ passport.deserializeUser(User.deserializeUser()); app.use(passport.authenticate("session")); app.use((req, res, next) => { if (!(req.originalUrl == '/users/login' || req.originalUrl == '/users/register')) res.clearCookie('returnTo') + console.log('IN THE APP.JS, req.orgUrl: ', req.originalUrl) res.locals.path = req.originalUrl; res.locals.success = req.flash("success"); res.locals.error = req.flash("error"); @@ -170,4 +171,4 @@ app.use((err, req, res, next) => { app.listen(port, () => { console.log(`Serving on port ${port}`); -}); \ No newline at end of file +}); diff --git a/package.json b/package.json index 4b4df0b..95f3023 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Dessert rating site. Built with Nodejs, Express, MongoDB", "main": "app.js", "scripts": { - "start": "npm app.js", + "start": "node app.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/views/desserts/index.ejs b/views/desserts/index.ejs index 7c238fc..160557d 100644 --- a/views/desserts/index.ejs +++ b/views/desserts/index.ejs @@ -11,13 +11,14 @@
Have a closer look by clicking on the image, and feel the.. Sweet!
+Explore the sweetness of your area with our interactive map, and discover + the best puddings near you on SweetApp's product browsing page!