Skip to content

isawamoose/jwt-pizza-service

 
 

Repository files navigation

🍕 jwt-pizza-service

Coverage badge

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.

Deployment

In order for the server to work correctly it must be configured by providing a config.js file.

export default {
  jwtSecret: 'your-cryptographically-generated-secret-here',
  db: {
    connection: {
      host: 'localhost',
      user: 'root',
      password: 'your-secure-database-password-here',
      database: 'pizza',
      connectTimeout: 60000,
    },
    listPerPage: 10,
  },
  factory: {
    url: 'https://pizza-factory.cs329.click',
    apiKey: 'your-factory-issued-api-key-here',
  },
};

Endpoints

You can get the documentation for all endpoints by making the following request.

curl localhost:3000/api/docs

Development notes

Install the required packages.

npm install express jsonwebtoken mysql2 bcrypt

Nodemon is assumed to be installed globally so that you can have hot reloading when debugging.

npm -g install nodemon

About

Backend service for making JWT pizzas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.3%
  • Shell 2.4%
  • Dockerfile 0.3%