Name: rest-api
Owner: Common Garden
Description: Rest API for Grow-IoT project
Created: 2017-03-01 04:48:41.0
Updated: 2017-05-23 21:32:15.0
Pushed: 2017-03-01 05:14:40.0
Homepage: null
Size: 863
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Rest API for Grow-IoT project
clone git@github.com:aruntk/grow-rest-api.git
install
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
rt APP_SECRET="super_secret_key"
h
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>