Make sure you have nodeJS properly installed on your system
Then run $ npm install
to install the dependencies
$ npm start
will start the server.
Make sure you properly set the following environnement variables :
GOOGLE_KEY
your key to use Google's apisSLACK_TOKEN
the private part of your Slack Webhook URL
You can easily deploy on Heroku, using the following commands :
$ heroku apps:create --name whatever-you-want
$ heroku ps:scale web=1
$ heroku config:set GOOGLE_KEY=xxxxxx SLACK_TOKEN=yyyyy/zzzz
git subtree push --prefix server heroku master
Once you're application is deployed online (Heroku or else where, doesn't matter), add a callback on the Sigfox backend with the following settings :
- Channel :
URL
- Type :
DATA/UPLINK
- URL :
http://example.com/locations
- Method :
POST
- Content-Type :
application/json
- Request body :
{"device":"{device}", "time":"{time}", "data":"{data}"}