Publish Progress #1

Merged
me merged 28 commits from init into main 2025-01-04 09:00:20 -07:00
Showing only changes of commit ed1f665dbd - Show all commits

33
run.sh
View File

@ -3,20 +3,37 @@
# Developer: Hyperling
# Purpose: Install all dependencies and run the project.
# Install any system packages.
## Install any system packages. ##
if [[ -z `which npm` ]]; then
echo "NPM needs to be installed."
sudo apt install npm
else
echo "NPM is already installed."
echo "NPM is already available."
fi
# Install/update any project modules.
echo "Ensuring NPM packages are correct."
if [[ -z `which tsc` ]]; then
echo "TSC needs to be installed."
sudo apt install node-typescript
else
echo "TSC is already available."
fi
## Install/update any project modules. ##
echo "Refreshing NPM packages."
bash -c "rm -r node_modules package-lock.json"
npm install package.json
# Start backend
node ./server.js
## Main ##
# Start frontend.
# ???
# Fork somehow other than just doing &? Then...
if [[ $parent ]]; then
# Start backend
node `pwd`/server.js >server.log 2>&1 &
else
# Start frontend.
tsc index.tsx
# ??? `pwd`/dist/index.js >ui.log 2>&1
fi
# Or just run them each with & and then kill with another shell script?