In this project we are going to signup a user and make his blogging profile, add blogs using Node.js, mongoDB and Express.js. this API will use JWT tokens as authentication.
install nde modules
npm install --y
npm install /*packages*/
configure your mogodb server
node app.js
- to get all user in the database -> .get("/",getAllUser);
- to signup a user -> .post("/signup", createUser);
- to login a user -> .post("/login" ,loginUser);
- to delete a user -> .delete("/delete/:id", loggedInUserOnly,- deleteUser);
- to update an existing user -> .put("/update/:id", loggedInUserOnly,upadateUser);