Rest API for Grow-IoT project
git clone git@github.com:aruntk/grow-rest-api.git
npm install
npm run compile
Start your meteor app(if you are using external mongo then ensure it is running).
By default mongo url is set as mongodb://localhost:3001/meteor (config.js)
If you want to change it to something else use set environment variable MONGO_URL
Set super secret key for jsonwebtoken (Default -> grow-iot-secret. inside config.js) env variable APP_SECRET
export APP_SECRET="super_secret_key"
npm start
http://localhost:8080/api/things/
Use postman
http://localhost:8080/api/authenticate/?username=<username>&password=<password>
http://localhost:8080/api/things?token=<token>
http://localhost:8080/api/things/:thing_id?token=<token>
http://localhost:8080/api/events?token=<token>
http://localhost:8080/api/events/:event_id?token=<token>