API made for the IoT Simulator APP in order to get and receive different types of requests
Make sure you have installed:
- Run
npm install
- If you run locally run the mongodb first using the command
mongod
and make sure to use the right connection stringmongoose.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
Using git
git clone https://gitlab.com/cristian.cernat97/iot-simulator-api.git
or download the zip file
...soon...
- Sometimes JWT might create the same token for very old users that results in "Not authorised error" (Just delete the old users): fixes coming.
- Nodemon Watcher
- Mocha Test Framework
- Mongoose ODM
- MongoDB NoSQL database
- Node NodeJS
- PassportJS Authentication library (multiple strategies)
- JWT JSON Web Token
- Multer Multipart/form-data
- Bcrypt Hashing algorithm for passwords
- CORS Cross Origin Resource Sharing middleware
Go ahead blame me for anything I am still learning
Version 2.1.0
- Cristian Cernat - (https://gitlab.com/cristian.cernat97)