Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.31 KB

File metadata and controls

62 lines (39 loc) · 1.31 KB

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).