This project was born when I came too early at my work building. We are a small startup on Vale do São Francisco, Brazil.
The objective of this project is provide an API with authentication and authorization for users to login into a home automation server that can, for now, open a eletronic lock.
This project uses MongoDB as database through the Mongoose library.
Install the dependencies:
npm install
Copy the .env.example
file to .env
:
cp .env.example .env
Update the variables to correspond your environment.
Generate the RSA keys:
npm run key:generate
or
node keys.js
Run docker
docker-compose up # verify first you are in sudo group.
Docker tutorial here
Create the super user
docker-compose exec node node initDatabase.js
This project doesn't have a front-end, yet.