alexandrelamberty / nidus-api

:diamond_shape_with_a_dot_inside: Home Automation and Monitoring API Server Application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Docker Coday DockerHub

Nidus API

Home monitoring API part of the Nidus project, see the Nidus API Specification

Features

  • Manage devices, zones, capabilities
  • Pair device
  • Create alerts and notifications
  • Security
    • Key
  • Tests

Technolgies and frameworks

Usage

This application is part of a Docker stack and rely on a MongoDB database service. see: Nidus project to launch the complete stack or only the database service.

Run with Go

If the database service is up and running, create an .env file and fill it accordingly with the database service configuration.

ENV=dev
PAIRING_KEY=9fca54477c8ad4e70dc5e1084f884aad
JWT_SECRET=d7a481461577ba4c3c4c6946cca7204b
JWT_EXPIRE=90
BCRYPT_HASH=7f91317e30a02bc7b87205e95b842df2
DATABASE_URI=mongodb://nidus:nidus@localhost:27017/nidus

Run the application:

go run cmd/main.go

Go to http://localhost:3333

Tests with Go

To implement

Build and run with Docker

Build the image, see: Dockerfile.

docker build . -t alexandrelamberty/nidus-api:latest

Run the image, we specify the ports mapping, environment variables file and network to join.

docker run -p 3333:3333 --network=nidus_default --env-file .env --name nidus-api -d alexandrelamberty/nidus-api:latest

References

About

:diamond_shape_with_a_dot_inside: Home Automation and Monitoring API Server Application.


Languages

Language:Go 99.7%Language:Dockerfile 0.3%