This repo contains all things HSP related.
- Run
npm iin HSPW-V3 root folder to install required packages - Run
npm run devin HSPW-V3 root folder to start the application onlocalhost:3000
- Route to
./src/serverfolder - Run
npm ito install required packages - Run
npm run devto start the server onlocalhost:8000
sshto the ec2 instance- Install git on ec2 instance using command
sudo yum install git -y - Install pip & mkdocs for documentation using command:
sudo yum install python3-pip -ypip install mkdocspip install markupsafe==2.0.1- Needed to fix an import issue when running
mkdocs build
- Needed to fix an import issue when running
- Make sure
nodeis installed in the ec2 instance, substitute the commandnvm install 18.15.0(Instruction: here) - Make sure
pm2is installed in the ec2 instance (Instruction: here) - Clone the repo
cdintoHSPW-V3folder- Frontend
- Run
npm iin HSPW-V3 root folder to install required packages
- Run
- Backend
cdinto./HSPW-V3/src/server- Run
npm ito install required packages
cdback to HSPW-V3 root folder- Build the static frontend file by running
- DEV
- Run
npm run build:dev - Run
pm2 start ecosystem.config.js --env dev
- Run
- PROD
- Run
npm run build:prod - Run
pm2 start ecosystem.config.js --env prod
- Run
- DEV
- Build static documentation site
- Navigate to documentation directory
- Run:
npm run build
- Run:
- Navigate to documentation directory
pm2 restart hspwpm2 reload hspwpm2 stop hspwpm2 delete hspw
- Run
pm2 logs
- Local
- Edit
.env.local
- Edit
- DEV
- Edit
.env.development
- Edit
- PROD
- Edit
.env.production
- Edit
- Local
cdinto./src/server- Edit
.env
- DEV
- Edit
env_devsection inecosystem.config.js
- Edit
- PROD
- Edit
end_prodsection inecosystem.config.js
- Edit
In documentation directory:
- Navigate to
./documentation - Run
mkdocs build- This will create a static build for the documentation in
./src/server/site
- This will create a static build for the documentation in