7Blog is a minimal blog that is created using MongoDB, ExpressJS - NodeJS and ReactJS.
https://sevenblog.herokuapp.com
- Authentication (using jsonwebtoken and Local Storage)
- Password saved in database in encrypted format (using bcrypt)
- Login
- Registration
- Dynamic Navigation bar for Login/Logout
- Add Post
- Homepage that displays all posts
- Separate page for every post
- Delete and Update post
- Admin user with seperate login, dashboard etc. (My models and Database have a field for admin already)
We have used ECMAScript modules in the backend. Make sure you have Nodejs v14.6 and above. Otherwise add "--experimental-modules" flag.
Create a .env file in the root folder and add the following in that file. I have personally used MongoDB Atlas in the project.
PORT = 5000
MONGO_URI = your mongodb uri
JWT_SECRET = 'xyz123'
npm install
cd frontend
npm install
# Run frontend (:3000) & backend (:5000)
npm run dev
# Run backend only
npm run server
# Run client only
npm run client
Run react build script to let react create production build that you can deploy.
cd client
npm run build