Backend service for making JWT pizzas. This service tracks users and franchises and orders pizzas. All order requests are passed to the JWT Pizza Factory where the pizzas are made.
JWTs are used for authentication objects.
In order for the server to work correctly it must be configured by providing a config.js file.
module.exports = {
// Your JWT secret can be any random string you would like. It just needs to be secret.
jwtSecret: 'yourjwtsecrethere',
db: {
connection: {
host: '127.0.0.1',
user: 'root',
password: 'yourpasswordhere',
database: 'pizza',
connectTimeout: 60000,
},
listPerPage: 10,
},
factory: {
url: 'https://pizza-factory.cs329.click',
apiKey: 'yourapikeyhere',
},
};You can get the documentation for all endpoints by making the following request.
curl localhost:3000/api/docsInstall the required packages.
npm install express jsonwebtoken mysql2 bcryptNodemon is assumed to be installed globally so that you can have hot reloading when debugging.
npm -g install nodemon