Skip to content

GjorgiG/wad-api-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assignment 2 - Web API.

Name: Gjorgi Gjorgiev

Features.

A bullet-point list of the ADDITIONAL features you have implemented in the API THAT WERE NOT IN THE LABS (or modifications to existing features)

  • Sign Up functionality
  • Login functionality

Setup requirements.

The same as normally running an app. "npm run" for the React App & "npm run dev" for the database server.

API Configuration

I created an .env file in the labs and used that one for my assignment as well.


NODEENV=development PORT=8080 HOST=localohost mongoDB=MyMongoURL TMDB_KEY=MyTMDBKey seedDb=true secret=MyJWTSecret


API Design

  • /api/users | POST | Logs in a new user if authentication is successful.
  • /api/users?action=register | POST | Registers a new user to the app.

Security and Authentication

Users will have to login with password and password is required to be 8 characters long, has to contain numbers and special characters. Favourites + Watchlist are protected routes.

Integrating with React App

Integrated the API into my React app by using the users collection to be used for the login page.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published