This is the Express.js backend for our Fast Food database project.
This project serves as the backend for a customer ordering system for a fast food restaurant. It should be used in conjunction with fast-food-database-project.
Users can perform create, read, update, and delete operations on customers, orders, and items using the API methods provided.
Clone repository and install dependencies.
git clone https://github.com/OtherAndrew/fast-food-web-service
cd ./fast-food-web-service
npm install
In utilities/sql_conn.js
, edit user
and password
to reflect your user credentials for your installation of MySQL.
Make sure the user you choose has read and write access .
Using MySQL, run SetupTables.sql
to create tables and insert initial values into the fast_food
database.
In the directory containing the web service (fast-food-web-service
), run:
npm run local
Open http://localhost:5000 to view the web service in your browser.
In the directory containing the web app (fast-food-app
), run:
npm start
Open http://localhost:3000 to view the web app in your browser.
-
Make sure
utilities/sql_conn.js
contains credentials for a user with read and write access. -
Make sure both the database and web service are up and running before running the web app.
The API documentation can be viewed by running
docme.sh
or
apidoc -i routes/ -o apidoc/ -d
and navigating to http://localhost:5000/doc while the web service is running.