Deploy Api-Server in Local Machine
Requirement
Api server
Installation Steps
Step 1: Download the food app and extract it
Step 2: Open terminal and Go to Full-apps folder where you have extracted,there you would find 3 modules api-server, admin-dashboard, mobile-app
Step 3: Go to ApiServer/.env and
Set Your Dev Environment
ENV=
JWT_SECRET=
db=
PORT=
SESSION=
at line no 3,4,5,6,7
Then set your Twilio
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
at line no 9, 10
Set your stripe key
STRIPE_KEY=
at line no 11
And set your oneSignal Creds
oneSignalAppId
oneSignalApiKey
at line no 13, 14
Step:4: Go to ApiServer/Script/restaurant.js and add
Google Api Key
at line no 14
Step 6: Go to ApiServer folder and install npm or yarn npm install
or yarn
Step 7: Open another terminal and enter mongod
this would start mongo server
Step 8: Go to ApiServer folder and enter npm run-script seed
Step 9: Start the api server npm start
now api-server is up and running
The common issue of the mongo server
unable to lock file: /data/db/mongod.lock resource temporarily unavailable. Is a mongod instance already running? , terminating,
You need to enter,
sudo killall -15 mongod