This is a pure Node V8 REST API which prototypes a pizza-delivery-eCommerce service.
Please refer to the API documentation
Gamma Pizza is DB-free service, meaning that all the data is saved to file system. Keep it in mind before to deploy this applicatio to a productive environment.
git clone [email protected]:ugobriasco/gamma-pizza && cd gamma-pizza
cp ./lib/config.js.template ./lib/config.js
# Edit configurations adding stripe and mailgun credentials
vim ./lib/config.js
# App setup
bash ./scripts/init.js
There are several ways to start the application, here some of them:
# Start the application, setting the environment parameter (default stage)
NODE_ENV=production node .
NODE_ENV=stage node .
# Start the application with debugging options set
NODE_DEBUG=server NODE_ENV=stage node .
# Quickstart (runs the setup and starts the app on Stage with debug option enabled)
bash ./scripts/start.sh
Access the REST API via:
http://localhost:3000
https://localhost:3001
tbd.
- New users can be created, their information can be edited, and they can be deleted. We should store their name, email address, and street address.
- Users can log in and log out by creating or destroying a token.
- When a user is logged in, they should be able to GET all the possible menu items (these items can be hardcoded into the system).
- A logged-in user should be able to fill a shopping cart with menu items,
- A logged-in user should be able to create an order. You should integrate with the Sandbox of Stripe.com to accept their payment.
- When an order is placed, you should email the user a receipt. You should integrate with the sandbox of Mailgun.com for this.
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.