-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·33 lines (25 loc) · 903 Bytes
/
run.sh
File metadata and controls
executable file
·33 lines (25 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# This is a simple Bash script that will get both the front-end running and the
# backend running simultaneously
# Exit script if we encounter an error
set -e
# Include the .env.local file if it exists
if [[ -f .env.local ]]; then
source .env.local
else
echo ".env.local not found! Refer to README.md on how to"
echo "create this file and include the connection info"
echo "for MongoDB. Exiting."
exit 1
fi
# Kill all processes if exit (stackoverflow.com/questions/360201)
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
# Get the back-end running in the background
./node_modules/.bin/nodemon server.js &
# Dev settings: Disable browser from auto-starting, and allow access from other
# computers during development
#export BROWSER=none
#export DANGEROUSLY_DISABLE_HOST_CHECK="true"
# Go into client directory and get frontend running
cd client/
npm run start