Skip to content

BlueCC8/iot-simulator-api

Repository files navigation

Project Title

Build Status Known Vulnerabilities

API made for the IoT Simulator APP in order to get and receive different types of requests

databseModel

Getting Started

Make sure you have installed:

Prerequisites

  • Run npm install
  • If you run locally run the mongodb first using the command mongod and make sure to use the right connection string mongoose.connect("mongodb://localhost/iot-simulator")
  • Create a file in the root folder nodemon.json specifying environment variables as follows
{
 "env": {
    "MONGO_ATLAS_PW": "your_mongo_cluster_password",
    "JWT_KEY": "your_JWT_secret"
  }
}
  • If you wish to populate the database access the routes and check what routes a available
  • Run nodemon index.js nodemon will watch for changes on your code

Installing

Using git

 git clone https://gitlab.com/cristian.cernat97/iot-simulator-api.git

or download the zip file

Testing and Middleware

...soon...

Tested with node version 10.17

Issues that you might encounter:

  • Sometimes JWT might create the same token for very old users that results in "Not authorised error" (Just delete the old users): fixes coming.

Built With

Contributing

Go ahead blame me for anything I am still learning

Versioning

Version 2.1.0

Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published