forked from http-party/http-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
sebjf edited this page Sep 6, 2023
·
1 revision
To use this server, e.g. on https://github.com/UCL-VR/vrgroupdatacollection:
- Clone this repository to a new directory under the
node
account, e.g.
cd /home/node/myexperiment
git clone https://github.com/UCL-VR/http-server.git .
- Delete package-lock.json (as npm has an issue on our version of CentOS)
rm package-lock.json
- Run npm install to install the dependencies
npm install
- Look up the next available port. e.g.
netstat -anoptu | grep 80
Remember the range of ports is 8000-8010.
- Add a new process to pm2. Make sure to pass
-g
to enable passing gzipped files, and-c
to disable caching (to make sure users always get the latest file if you upgrade your experiment). E.g.,
pm2 start bin/http-server myexperiment -- -g -c-1 -p 8006
The --
at the end is for passing process arguments.
- Save the process list
pm2 save
- Verify the default page can be accessed, e.g.
http://vrgroupdatacollection.cs.ucl.ac.uk:8006
Copy your Unity project into /public with, e.g. WinSCP.