/NodeExpress-Server

Node Express server that handles the communication between a mobile application & an esp32 device

Primary LanguageJavaScript

Polytech - IoT API Server

BENALI Myriam & NAAJI Dorian

API json objects structure

user

Take a look at :

Example :

{
    "email": "myriam.b@gmail.com",
    "password": "blabla",
    "firstName": "Myriam",
    "lastName": "B",
    "sex": true,
    "age": 23,
    "address": "rue bloblo",
    "city": "Villeurbanne",
    "country": "France"
}

connectedDevice

Take a look at :

Example :

{
    "name": "device_esp32_leds",
    "description": "that device links one esp32 microCPU with 1 NFC reader, 1 motion sensor and 3 LEDs.",
    "router": "192.168.0.19",
    "state": {
        "pir_state": {
            "detected_something": false
        },
        "nfc_state": {
            "is_activated": false
        },
        "led_state": {
            "is_on": false,
            "red_value": 144,
            "green_value": 17,
            "blue_value": 232
        }
    }
}

Getting started

Installing MongoDB

In order to be able to start the project, you need to download MongoDB and to install it, as well as MongoDB Compass that is embedded with the installer.

Getting started with MongoDB

MongoDB documentation is really complete. Check it out for more insight.

Start the project

nodemon app.js