Full-stack blog application built with Node.js, Express and MongoDB. Users can create, read, edit, and delete blog posts.
- Create and publish blog posts
- View all posts or individual post details
- Edit and delete posts
- Simple, unobtrusive and responsive UI
- Backend: Node.js with Express
- Database: MongoDB with Mongoose
- Frontend: EJS templates
- Logging: Morgan
- Utilities: Lodash, Dotenv
Before you begin, you'll need a MongoDB database:
-
Create a MongoDB Atlas Account
- Go to MongoDB Atlas
- Sign up for a free account
-
Create a Cluster
- Click "Create a Deployment" and select the free tier
- Choose your preferred cloud provider and region
- Wait for the cluster to be deployed (around 5-10 minutes)
-
Get Your Connection String
- Click "Connect" on your cluster
- Choose "Drivers"
- Copy and save the connection string (replace
<db_password>with your actual password)
-
Add Your IP Address
- In MongoDB Atlas, go to "Network Access"
- Click "Add IP Address" and add your current adress. Should appear a button at the top of the page.
- Clone the repository
- Install dependencies:
npm install - Create a
.envfile with your MongoDB URI:MONGODB_URI= - Start the server:
node app.js - Visit
http://localhost:3000in your browser
controllers/- Routingmodels/- MongoDB schemaroutes/- Endpointsviews/- EJS templatesservices/- Database connectionpublic/- Static assets



