A blog site managed by a single admin. The Odin Project exercise to learn NodeJS, Express, and authentication.
- Everybody can see blog posts.
- People can signup and become a member.
- Users can comment to blog posts.
- Users can update their profile info.
- Users can delete their profile and comments.
- Admin can add, edit, delete blog posts.
- Admin can delete users and comments.
Create .env file in backend folder:
- clientUrl = "http://localhost:5173" If your client url different, make changes accordingly.
Also create .env file inside the frontend folder:
- VITE_baseUrl = "http://localhost:3000/blog-api/v1/"
After creating those environment variables continue to dependency installation.
Execute inside the both frontend and backend folders after cloning the repo:
npm install
Execute:
npm start
Or to start the server continuously with nodemon:
npm run devstart
Inside the frontend folder execute:
npm run dev
If you do not want to create new user,to login as user use:
- email - test@test.com
- password - 1234
To log in as admin, use:
- email - admin@admin.com
- password - 1234