This is a proof-of-concept example for tying several APIs together, based on Jeremiah Cohick's fitbit-hapi-demo. It will be adapted to add libraries, and break out the code, but for now it is simply a walk-through of my demo at Full Stack London.
It uses:
For the OAuth piece: This is a proof of concept example for using the Fitbit Web API. It demonstrates:
I'm serious. This is not a well structured Node.js application.
This example app uses NeDB, a flat-file database similar to Mongo. It's meant to be easy to demo, not highly scalable.
This example assumes you're using Node.js 4.2.x
npm install
Set your OAuth redirect URI to: /signin
Set your subscriber endpoint URI to: /webhook-receiver
Set the environment variables using the instructions at http://help.modulus.io/customer/portal/articles/1701180-using-environments-variables FITBIT_OAUTH2_CLIENT_ID FITBIT_OAUTH2_CLIENT_SECRET COOKIE_PASSWORD
TWILIOSID TWILIOAUTHTOKEN TWILIOPHONENUMBER
TWITTER_CON_KEY TWITTER_CON_SECRET TWITTER_ACC_TOKEN TWITTER_ACC_SECRET
(PORT and CLOUD_DIR will be automatically added by Modulus)
How non-ephemeral file storage (used by NeDB) works on Modulus: http://help.modulus.io/customer/en_us/portal/articles/1653448-file-storage
Content type
Image
Digest
sha256:94fca81c6…
Size
183 MB
Last updated
almost 11 years ago
docker pull synedra/fitfood-demo-fullstack