-
NodeJS Installation
- 64 bit or 32 bit
- Website - https://nodejs.org/en/
- Nodejs version used - 12.6.0
- NPM Version Used - 6.14.5
-
Global Installation of NextJS (Not required if using existing files)
- Website - https://nextjs.org/docs/getting-started
- Sets up the boiler plate for new project
npm i create-next-app npx create-next-app myApp
-
Server Package Dependencies (Insert Image of package.json)
-
Front End Package Dependencies (Insert Image of package.json)
-
Command to install all dependencies
npm install
- Need to run in root folder and in client-side-web folder
npm run dev
Run this in the root folder of the application.
This will start the front end on localhost:3000 and server on localhost:5000
- Entry point of the server is server.js in root directory
- All different routes (like localhost:5000/test) are placed in the routes directory
- login.js => used to process the phone number and name of the customer
- Stores in dB if there is a new number
- Encrypts user data and sends back to front end using JSON Web Token
- menuDetails.js => endpoint for menu - Queries the dB for menu details and return JSON for the menu 3, orderDetails.js
- qsr.js
- s3image.js
- db.js - connection to the mysql database
- keys.js - holds all the sensitive information for the table (Don't make this public)
- mongodb.js - connection to mongodb atlas
Contains all the information regarding tables
- restaurants folder contains the structure of the table of every included restaurant
Other Tables:
- Customer.js - phone number and name of the customer
- Merchant.js - merchant details for onboarding