- 'Blog' and 'blogging' are now loosely used for content creation and sharing on social media, especially when the content is long-form and one creates and shares content on regular basis.
- This is a dynamically updating Blog posting website developed primarily using Node Js with EJS template engine and Mongoose as ODM(Object Data Modeling library).
- HTML
- CSS
- EJS template engine
- Node JS
- Express JS
- Mongoose
- Drop a ⭐ on the GitHub repository.
- Download and install a code/ text editor.
- Recommended-
- Download Node Js and npm(Node package manager) (when you download Node, npm also gets installed by default)
- Mongo DB community editition is free and a great software in order to work with MongoDB applications. Download Mongo DB community editition
- Robo 3T is a desktop graphical user interface (GUI) for Mongo DB. It can help to skip running all the Mongo DB commands manually every time we want to access the data. Download Robo 3T (optional)
- Clone the repository by running command
git clone https://github.com/ <your user-name> /BlogSite.git
in your git bash.
- Run command
cd BlogSite
.
- Run this command to install all dependencies for the project.
npm install
All the current dependencies -
"body-parser": "^1.18.3",
"ejs": "^2.6.1",
"express": "^4.16.3",
"lodash": "^4.17.20",
"mongoose": "^5.11.9"
- Run this command on your terminal/ bash to start the Mongo server on port 27017(default).
mongod
- Run this command to start the project on local host 3000.
npm start
- Open link to view the website in your browser window if it doesn't open automatically.
http://localhost:3000/
- You can learn more about EJS template engine and its syntax to know how we can use it inside our HTML using the documentation
- Now you are all set to use this project.
show dbs
use db <db name>
show collections
<db name> .find()