-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the _build script + keep using port 3000 (so not to have to chang…
…e cors settings)
- Loading branch information
1 parent
66def4c
commit 2e2379f
Showing
1 changed file
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
#! /bin/bash | ||
#! /usr/bin/env bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
cd ${SCRIPT_DIR} | ||
|
||
# first see if node is installed on the users system | ||
node -v | ||
if [ $? -ne 0 ]; then | ||
echo "Node.js is not installed on your system." | ||
echo "Please install Node.js and try again." | ||
exit 1 | ||
fi | ||
|
||
echo "Node.js is installed on your system." | ||
echo "Installing frontend dependencies..." | ||
npm install | ||
|
||
echo "building the local one pager web site" | ||
./frontend_build.sh | ||
|
||
echo "installing local webserver srevice" | ||
npm install -g serve | ||
|
||
echo "React.js is installed on your system." | ||
echo "Running frontend..." | ||
python -m webbrowser http://localhost:1207 | ||
serve -s build -l 1207 | ||
python -m webbrowser http://localhost:3000/ | ||
serve -s build -l 3000 | ||
|
||
echo "Frontend is running." | ||
echo "Press Ctrl+C to stop." | ||
|