genuinex-screen-sync-server
Version:
GenuineX key value sync server
68 lines (37 loc) • 1.44 kB
Markdown
A simple key-value API for the GenuineX Screen Sync experience.
The application runs as a service on windows and linux machines (only). This is
done by using the package
(os-service)[https://www.npmjs.com/package/os-service].
To run add this to init.d on linux run the following command:
$ sudo node service-add.js
To run add this as a service on windows, run command prompt as an administrator
$ node service-add.js
To remove (linux):
$ sudo node service-remove.js
windows:
$ node service-remove.js
## Requirements
* NodeJS - ^10.x
## Getting Started
1. Install node dependencies
On production it is recommended to not install dev dependencies.
``` npm install ```
2. Start server
``` npm start ```
Check out the available endpoints [here](./docs/api.md)
***N.B.*** The server will run in production mode by default, use ```npm run
start:dev``` to start in development mode
## Datastore
When running in production the server uses a SQLite DB to store the trend data,
in dev mode all data is stored in memory instead of the local sqlite file.
The database file created in production mode can be found in the root of this
project and is called ```genuinex.sqlite3```
### Viewing stored data
To view the contents of the datastore [DB Browser fo
SQLite](https://sqlitebrowser.org/) can be used.
## Testing
``` npm test ```
## TODO
[] Add more tests