Mpi is a movie api, created as a exercise/practicing project where i aim to develop a crud centered around movie, with this project i will try to test new functionalites and streamline some good practices.
to get the project to work on your machine you will need to follow these steps:
- install node and npm in your machine
- clone this repository
- run:
npm install
to install the dependencies - remove the
.template
from.env.template
and fill it with your info - start the server with:
npm start
after doing that you should have a copy of the API running on you machine =)
movies will be represented as follows:
{
"name":"name of the movie",
"year":"year movie was released",
"description":"small description off the movie",
"director":"the director of the movie",
"torrent":"a working magnet link for the movie"
}
as all other cruds/apis this one will need endpoints to be connected to, these are the available endpoints to intereact with the api:
all of these endpoints will be based on /mpi/1.0
this endpoint will return all the movies in the database as a array
this endpoint will return the movie with the specified id
this endpoint will accept a POST request with a new movie object as the bodie, and will add this movie to the database
this endpoint will accept any valid movie parameter and will update that parameter on the movie with the given id
this endpoint will delete the movie with the given id