Blood Pressure Backend borrowed from Nick Lathen
- clone the respository.
- run npm install (or yarn)
- setup credentials
- create an Auth0[http://auth0.com] account (if you don't have one)
- put the appropriate credentials into config/config.js (NOTE: for the "token" field in config.js, you'll be able to define "token" in step 6)
- put the appropriate credentials into tools/curl-auth0
- create an user in your auth0 account and save the and for step 6
- run a local postgres server with a database called 'underpressure'
- (OSX) brew install postgres
- brew services start postgresql (service)[https://launchschool.com/blog/how-to-install-postgresql-on-a-mac]
- createdb underpressure (NOTE: use "dropdb underpressure" to delete the database)
- start the server: node server/app.js
- curl the data endpoint:
- ./tools/curl-auth0 http://localhost:9999/api/getPressures
- get the ID TOKEN from the console output and add it to the config.js as the "token" value
- run npm test to test that everything is working and populate the database with a year of pressure data (takes about 30 seconds)
- rerun step 1 and see the data
once the UI is written, you'll be able to:
- go to 127.0.0.1:9999 and sign up for a new account
- login, enter and explore the data.