- Node.JS
- NPM
- MongoDB
- Redis
- pilight-daemon
Copy .env.example to .env and make your configurations there.
Oktav.IO Application
HOST
- Defaults to OS hostname, orlocalhost
.PORT
- Defaults to random.COOKIE_HASH
- (Required) 32-char long hash for cookiesCOOKIE_NAME
- (Required) Name for chookie
Redis
REDIS_HOST
- Defaults to127.0.0.1
REDIS_PORT
- Defaults toREDIS_PASSWORD
- Defaults tonull
REDIS_PARTITION
- (Required)
MongoDB
MONGO_URL
- (Required) For example:mongodb://127.0.0.1:27017/
(dont forget the trailing slash)MONGO_DB
- (Required)MONGO_USER
- Defaults tonull
MONGO_PASS
- Defaults tonull
Pilight
PILIGHT_SKIP
- Defaults tofalse
PILIGHT_HOST
- (Required, if skip is not set to True)PILIGHT_PORT
- (Required, if skip is not set to True)
Additional configurations
SKIP_DOTENV
- Skip loading .env-fileTESTING
- Used by testsCOMMENCE_TESTING
- Used by tests
To install node packages required to run the application, other than general requirements, execute the following command in the project root.
npm install
You wont get far unless you have an account that can login and add/update/delete stuff. Whilst logged in you can create more users.
node bin/createUser
npm start
will start the application but will also exit the application if you close your terminal window.
A good way to start applications and keeping them alive is to use PM2. Follow the installation guide and then run pm2 start oktavio.js
.
POST
/api/users/loginGET
/api/users/logoutPOST
/api/usersPUT
/api/usersDELETE
/api/usersGET
/api/usersGET
/api/users/:id
POST
/api/devicesPUT
/api/devicesGET
/api/devicesGET
/api/devices/{id}DELETE
/api/devicesPOST
/api/devices/{id}/activatePOST
/api/devices/{id}/deactivate