Skip to content

Commit

Permalink
use the _build script + keep using port 3000 (so not to have to chang…
Browse files Browse the repository at this point in the history
…e cors settings)
  • Loading branch information
marc-portier committed May 18, 2022
1 parent 66def4c commit 2e2379f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions frontend/frontend_run.sh
100644 → 100755
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."

0 comments on commit 2e2379f

Please sign in to comment.