/nodeBoiler

To create any react node stack on

Primary LanguageJavaScript

OttoDot

Web Application to allow students to learn in a fun and social manner

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser. The page will reload if you make edits.
You will also see any lint errors in the console.

cd Server

node server.js

Runs backend server to allow react frontend to function and facilitate connection to SQL
Config file must be updated with SQL credentials to enable backend services to work

Routes

All routes are defined in routes/index.js

/login

{
    "username" : String,
    "password" :  String
}

Logs user into the system and returns an authorization token to be used for subsequent calls

/signup

{
    "username" : String,
    "password" :  String
}

Creates user in the system

Security

All API calls would require a jwt token in the authorization header which can be obtained by calling the route /login with the right credentials
Tokens last for 1 day and would require relog in to regenerate a new token. Refresh token function can be done sometime in the future

npm test

Launches the test runner in the interactive watch mode.