This is a mock private API that will return URLs of desired movie posters. It uses a third party service OMDB.
- GET
- /movies (Forbidden)
- /movies/{movie_title} (Returns movie poster URL)
- /movies/favorite (Returns all of users favorite movie)
- POST
- /movies/favorite (Insert into a users favorite movie)
- GET
- /auth (Confirms whether TOKEN is valid)
- /auth/login (Urges user to POST their name and password to this endpoint)
- POST
- /auth/login (Receives name and password and check if it's valid. Will return TOKEN if it's a success.)
-
Install all the node modules npm install
-
Setup valid connection MYSQL URI to database Insert at ./database/connection.js
-
Setup valid database credentials Insert at ./config/config.json
-
Migrate models to MYSQL. npx sequelize-cli db:migrate
-
Seed the DB. npx sequelize-cli db:seed:all
-
Run the server. npm run dev
-
Everything should be good to go! I used a request.rest file to send requests to test the app. :)