Basic Login API + Movies / Shows endpoints!
npm install
You have to set up your own .env with these variables:
MONGODB=you_have_to_set_this
SECRETORKEY=you_have_to_set_this
MYHOST=localhost
then your can use:
npm start
The endpoints to solve the minimum required of the challange are:
/api/user/signup ---> Use an OBJ like this one:
{
"firstName":"myFirstName",
"lastName":"mySecondName",
"password":"myPassword",
"eMail":"[email protected]"
}
This will grant you 2 tokens, one access and one refresh.
/api/user/signin ---> Use an OBJ like this one:
{
"eMail":"[email protected]"
"password":"myPassword",
}
/api/user/refreshtoken ---> Send Authorization Bearer refreshToken in headers , if all is good will receive new credentials.
/api/movies/ ---> To sort by duration and filter the movies that are higher in duration than 110 you can send this on body for example:
{
"filterBy":{
"duration":{"$gte":110}
}
}
/api/directors ---> To add a new director you can send atleast firstName and lastName like this
{
"firstName":"Sylvester",
"lastName":"Stallone"
}
Node.JS
MongoDB / Mongoose /Express
JWT
๐ค Federico Budtke
- Github: @WernerBudtke
- LinkedIn: @https://www.linkedin.com/in/fwbudtke/