- Clone repository to your device.
git clone https://github.com/austinginn/flash-comm.git
- Navigate to server directory.
cd flash-comm/server
- Install dependencies
- Socket.io
- Express
npm install
A precompiled web app is included in this repository and will run out of the box. If you want to build the web UI from scratch, the repository can be found here.
Only one active repository currently for nodejs, found here
The flash-comm server lets you define spaces in a spaces.json file. If you run the server before creating spaces.json, one will be created for you with generic space naming. You can always modify this in the future.
- Create a spaces.json file with at least one space.
touch spaces.json
nano spaces.json
- The spaces.json file should be formated like this:
[
{
"id": "someUniqueID",
"name": "human readable space name",
"flash": false
},
{
"id": "someUniqueID2",
"name": "human readable space name 2",
"flash": false
},
...
]
- A devices.json file is created on first run. Edit this file if you need to modify a device or want to manually enter a device.
npm start
By default the server runs on port 3000. You can pass a port as the first argument.
npm start --port=3001
In a production environment, use a process manager like PM2 to run the server.