Express, MySQL, Bcrypt, JWT
Make sure you have MySQL set up on you machine. A sql file has been provided for a simple user table
npm install npm run server
Configure your database in './utils/database_utils/database_connection.js'
//Initial routes:
// Add a new user to the system
POST: /api/create-new-user
{
"email": "[email protected]",
"password": "password"
}
// Authenticates and returns a JWT (access-token)
POST: /api/authenticate
{
"email": "[email protected]",
"password": "password"
}
// Authenticated route. Requires 'access-token' header to be set
GET: /api/some-other-route