Home Recorder
The purpose of this app is to expose an endpoint to record home events. In future releases I will have a Node Red integration.
How to run
Standard machine installation is simple. Make sure you have the following environment setup.
Environment
- Node: v7.4.0
- npm: v4.0.5
- mongodb: min v2.6.5 to v3.0.4
Setup
- Make sure you have all the right dependencies by running
npm install
- Setup your
.env
file. Just runcp .env.example .env
- Make any changes to the configuration
- You can stage a user for authentication routes by running
node bin/stage.user.js
To customize the user edit the
User
in thestage.user.js
file.
Running Tests
Simply run npm test
Running the Development Server
Just run npm start
Using Docker
Don't want to pollute your local machine and have docker installed then simply use the provided bin scripts.
Running Tests
Simply run ./bin/test.sh
Run the server in a container
- Start the container,
./bin/development.sh
- Find the container id,
docker ps
- Add a user,
docker exec -it <api container id> node bin/stage.user.js