A simple application to control your Ninja Block's LED
- Node.js (http://nodejs.org/)
- Redis (http://redis.io/)
- Have registered a Ninja App
git clone https://github.com/thatguydan/node-ninja-led.git
cd node-ninja-led
npm install
redis-server &
This can be done at https://a.ninja.is/hacking.
Important: Your callback URL will be http://localhost:8000/auth/ninjablocks
The Client ID and Secret given will be used in Step 3.
export NODE_ENV=development
export NINJA_CLIENT_ID=[your client id]
export NINJA_CLIENT_SECRET="[your client secret]"
node app.js
http://localhost:8000
heroku apps:create --addons redistogo:nano
Important: You must note down the app URL you create in this step as it must be used for the callback when creating a Ninja App
This can be done at https://a.ninja.is/hacking.
Important: Your callback URL will be the [heroku url]/auth/ninjablocks. For example, if the result of step 1 was:
Creating sheltered-sands-8183... done, stack is cedar
Adding redistogo:nano to sheltered-sands-8183... done
http://sheltered-sands-8183.herokuapp.com/ | [email protected]:sheltered-sands-8183.git
Your callback url would be http://sheltered-sands-8183.herokuapp.com/auth/ninjablocks
The Client ID and Secret given will be used in Step 3.
heroku config:set NINJA_CLIENT_ID=12345
heroku config:set NINJA_CLIENT_SECRET="Your Ninja Secret"
git push heroku master
MIT