Skip to content

mahmudul-hasan-sreejon/restful-api-with-node.js-and-mongodb

Repository files navigation

Node REST API

This project is a REST API server implementation built on top Node.js and Express.js with Mongoose.js for MongoDB integration.

Running project

Docker

You need to have Docker installed.

Run server

docker-compose up -d
OR
./build.ps1

NOTE: Demo dataset will also be created through this process.

Make Requests

Get your data:

http GET http://localhost:3000/api/courses

http GET http://localhost:3000/api/courses/<course-id>

Create a new course:

curl -v -H "Content-Type: application/json" -X POST -d "{ \"name\": \"<course-name>\" }" http://localhost:3000/api/courses

Update course name:

curl -v -H "Content-Type: application/json" -X PUT -d "{ \"name\": \"<new-course-name>\" }" http://localhost:3000/api/courses/<course-id>

Delete data:

http DELETE http://localhost:3000/api/courses/<course-id>

Modules used

Some of non-standard modules used:

Tools used

Author

Created and maintained by Mahmudul Hasan Sreejon (@mahmudul-hasan-sreejon).

About

RESTful API implementation on Node.js and MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published