Used to automate the startup and shutdown of the laser cutter and all of the dependant devices from a Raspberry Pi
It is also used to control access to the laser. Access is handled by the membership management application.
The following pins are used for NFC but it's currently not enabled.
Install node.js, one way is with this arm package
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
After node.js is installed from the root of the project run:
npm install
When installing on the production device you don't need to install the dev dependencies.
npm install --production
Installing on a RPi does take a while.
https://nodejs.org/en/download/package-manager/
Start by adding a new config.json file, see config.json.sample for an example.
When setting up OAuth providers, the callback set in the provider should be http://
For google callbacks you cannot use internal IP addresses however you can use a host name with a valid domain name regardless if the IP resolves to an internal or external address.
If dev dependencies are installed you can run all test cases with
npm test
To set the port set the environment variable PORT to whatever port you want to listen to, by default it's 3000
npm start
To enable debug logging then set the environment variable DEBUG to laser:* to log all laser related events.