Skip to content
sebjf edited this page Sep 6, 2023 · 1 revision

To use this server, e.g. on https://github.com/UCL-VR/vrgroupdatacollection:

  1. 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 .
  1. Delete package-lock.json (as npm has an issue on our version of CentOS)
rm package-lock.json
  1. Run npm install to install the dependencies
npm install
  1. Look up the next available port. e.g.
netstat -anoptu | grep 80

Remember the range of ports is 8000-8010.

  1. 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.

  1. Save the process list
pm2 save
  1. 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.

Clone this wiki locally