WebSocket server for the ceiled-web
UI in order to display patterns on LED devices connected through ceiled-driver
. It hosts the JSON WebSocket API and interfaces with the LED strips through the the ceiled-driver's Unix socket. It also connects to a MongoDB database containing all whitelisted authentication tokens that are allowed to perform requests to change the lights.
This software can be run on any computer that supports NodeJS or Docker.
- NodeJS v8.0 or higher (just get latest LTS)
- MongoDB installed and running.
- Running instance of
ceiled-driver
yarn install
yarn start
docker build -t ceiled-server .
docker run ceiled-server
Name | Default value | Description |
---|---|---|
PORT |
6565 |
Port to host the WebSocket API on |
INSECURE |
false |
Whether to host the WebSocket over HTTP (true ) or HTTPS (false ) |
KEY_FILE |
localhost.key.pem |
HTTPS certificate private key location, relative to this directory. |
CERT_FILE |
localhost.cert.pem |
HTTPS certificate public key location, relative to this directory. |
CEILED_SOCKET |
../ceiled-driver/ceiled.sock |
Location of the ceiled-driver Unix socket file, relative to this directory. |
DB_HOST |
localhost:27017 |
Address of the MongoDB database used for the authentication of requests. |
DB_AUTH |
admin |
Name of database to authenticate the MongoDB connection with. |
DB_NAME |
ceiled |
Name of the database to use for data. |
DB_USERNAME |
Username to authenticate to MongoDB with | |
DB_PASSWORD |
Password to authenticate to MongoDB with |