https://github.com/mvaibhav131/blogapi_task
BlogApp_API
https://github.com/mvaibhav131/blogapi_task
api-rest api-testing bcryptjs expressjs jest json jwt mongodb mongoose mvc-architecture nodejs supertest unit-testing
Last synced: 3 months ago
JSON representation
BlogApp_API
- Host: GitHub
- URL: https://github.com/mvaibhav131/blogapi_task
- Owner: mvaibhav131
- Created: 2023-05-16T15:36:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-17T10:50:33.000Z (about 3 years ago)
- Last Synced: 2025-07-06T03:47:27.397Z (12 months ago)
- Topics: api-rest, api-testing, bcryptjs, expressjs, jest, json, jwt, mongodb, mongoose, mvc-architecture, nodejs, supertest, unit-testing
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BlogAPI_Task
## clone the above repo and install dependancy using command ==> `npm install`
## run ==>`npm start`
## Your server is run in==> `localhost:5000`
### to check the api routes with foll url
### Base Url for blogs: `localhost:5000/blogs`
### Base Url for user: `localhost:5000/user`
# Routes for Blogs:
## get("/",getAllBlogs); // Get all blogs
## post("/add",addBlogs); // Create new blogs
## put("/update/:id",updateblog); // Update blogs according to id
## get("/:id",getById); //Get blog by id
## delete("/:id",deleteBlog); //Delete blog by id
## get("/user/:id",getByUserId); //Get blog by userID
## post("/search",getByKeyword); // Search blog according to keywords
# Routes for User:
## get("/",getAllUser ); // Get all user list
## post("/signup",signup); // Sign up user
## post("/login",login); // Login User
# TestCases is added for both user and blogs
## To Run TestCases run command ==> `npm run test`