Nodejs Masterclass | Pizza Delivery API | Homework #2
- node 8 LTS or greater
- postman app for interaction with API
npm start
or
node ./index.js
Application will start on default port 3000.
To use another port, please change env variable SERVER_PORT
to your desired port number.
npm test
or
node ./test.js
app/ - application business logic
- routes/
-- tokens.js
-- users.js
-- index.js - all handlers
- errors/
-- HttpError.js - basic http error which can be sent as response to API user, statusCode 500
-- BadRequestError.js - response with statusCode 400
-- NotFoundError.js - response with statusCode 404
-- ... - other HTTP errors
-- index.js - all errors
- server.js - server logic
- storage.js - storage driver for application
- Validator.js - validator with application specific schema extensions
config/
- index.js
lib/
- tests/ - testing library
- hash/ - hash helpers
- store/ - storage driver
- helpers/
- validation/ - validation library
- Pipeline.js - helper for sending passables through pipeline of callables
storage/
- app/ - application storage