This is a full-stack blog app, also appropriately illustrating the concept of restful routes. This app is created using MEN(MongoDB, express.js, node.js) Stack.
Tools and dependencies:
- Node.js
- MongoDB
- CSS
- Concept of restful routes have been taken from : https://codepen.io/urketadic/details/oZRdRN
- For layout, semanticUI cdn has been used : https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.4/semantic.css
Dependencies:
- "body-parser": "^1.18.3",
- "ejs": "^2.6.1",
- "express": "^4.16.4",
- "express-sanitizer": "^1.0.4",
- "method-override": "^3.0.0",
- "mongoose": "^5.4.0"
View it at : https://desolate-retreat-25693.herokuapp.com/blogs
- Download node.js from here, inclusive of npm
- To install dependencies, use npm install --save
- Download mongoDB, refer to docs
The views directory of the repo contains ejs files (Embedded JavaScript), which is nothing, but HTML files where we can write javascript inline to elements, without explicitly using the script tag. partials sub-directory contains the header and footer files, which form the boilerplate of the HTML file. Enjoy!!!
-
Clone/download the repository.
-
in the directory of the project, execute the following commands:
* npm install express ejs body-parser method-override express-sanitizer mongoose --save * node app.js
-
Then in the local browser, run localhost:8080