https://github.com/esron/systranca-server
RESTful API server for a home automation controller server built in Express
https://github.com/esron/systranca-server
express-validator expressjs hacktoberfest home-security internet-of-things
Last synced: 9 months ago
JSON representation
RESTful API server for a home automation controller server built in Express
- Host: GitHub
- URL: https://github.com/esron/systranca-server
- Owner: esron
- License: mit
- Created: 2019-04-06T21:36:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T06:24:15.000Z (over 1 year ago)
- Last Synced: 2025-04-24T04:49:46.970Z (9 months ago)
- Topics: express-validator, expressjs, hacktoberfest, home-security, internet-of-things
- Language: JavaScript
- Homepage:
- Size: 2.42 MB
- Stars: 13
- Watchers: 2
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SysTranca Server Project
[](https://standardjs.com)
[](https://travis-ci.com/esron/systranca-server)
[](https://github.com/esron/systranca-server/actions/workflows/codeql-analysis.yml)
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 electronic lock.
# Instructions
This project uses [MongoDB](https://www.mongodb.com/) as database through the [Mongoose](https://mongoosejs.com/) library.
Install the dependencies:
```bash
npm install
```
Copy the `.env.example` file to `.env`:
```bash
cp .env.example .env
```
Update the variables to correspond your environment.
Generate the RSA keys:
```bash
npm run key:generate
```
or
```bash
node keys.js
```
-----
### Docker SetUp
You will also need a MongoDb instance and a MQTT broker.
This project comes with a `docker-compose.ym` file to help you deploy that locally, just:
```bash
docker-compose up
```
If you see this error when to execute node container:
```bash
Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/home/node/app/README.md'
```
execute this to fix it:
```bash
sudo sysctl fs.inotify.max_user_watches=582222 && sudo sysctl -p
```
Create the super user
```bash
docker-compose exec app node initDatabase.js
```
This project doesn't have a front-end, yet.