That Restful API developed with Node.JS and Express.
Clone this folder and install dependencies.
npm install
Create a file named ".env" in the root directory and fill its contents as follows.
DB_HOST=xxx
DB_NAME=xxx
npm start:dev
// for locally
Route | HTTP Verb | POST body | Description |
---|---|---|---|
/api/movies | GET |
Empty | List all movies. |
/api/movies | POST |
{'title':'foo', 'cover':'cover url' } | Create a new movie. |
/api/movies/:_id | GET |
Empty | Get a movie. |
/api/movies/:_id | PUT |
{'title':'foo', 'cover':'new cover url'} | Update a movie with new info. |
/api/movies/:_id | DELETE |
Empty | Delete a movie. |