Skip to content
Middleware for interacting with Nokia Health (Withings) devices.
JavaScript HTML Other
Branch: nokia
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
config
lib
migrations
models
php
public/stylesheets
routes
test
views
.eslintrc.json
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.md
README.md
app.js
db.test.sqlite
npm-shrinkwrap.json
package.json

README.md

Nokia Health

Build Status

Middleware designed to improve interactions with the Nokia Health API, and thus Nokia Health devices.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Before installing, download and install Node.js.

Installing

Clone this repository:

git clone https://github.com/martinchapman/nokia-health.git

Change into the directory:

cd nokia-health

(Optional) From within the project folder, create a node virtual environment (within a python virtual environment), and activate it:

virtualenv env
. env/bin/activate
pip install nodeenv
nodeenv nenv
. nenv/bin/activate

Install dependencies:

npm install

Modify lib/config.js to include your NOKIA_CONSUMER_KEY, NOKIA_SECRET and CALLBACK_BASE, a publicly accessible end-point to receive callbacks from Nokia's API.

For notification callbacks, php/nokia.php should also be publicly accessible via your CALLBACK_BASE.

Usage

From within the project folder, run with:

npm start

The app runs by default on port 5001.

Receive authorisation to query a user's Nokia device data by having them visit the URL generated at

http://localhost:5001/register

and authorise your application.

Then, retrieve an initial read of a user's body measures by visiting:

http://localhost:5001/dashboard/<userId>

Running the tests

Run both unit and lint tests using npm:

npm test

Deployment

Run in production using NODE_ENV environment variable, e.g.:

NODE_ENV=production npm start 

Deployed systems should switch to a production database format (e.g. Postgres).

Built With

  • Express - The web framework used.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Produced as part of the CONSULT project.

CONSULT project

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

You can’t perform that action at this time.