Backend implementation for the Goals App I'm currently building. RESTFUL api built on node and express.
Following the instructions in this Tutorial during initial implementation, then adapted to meet use case for my application.
On initial setup, run:
$ npm install
To launch the swagger interface:
$ swagger project start -m
And to launch the swagger editing interface:
$ swagger project edit
Use the DEBUG flag when running locally. This will update a few configurations to allow the app to run
$ DEBUG=true swagger project start
You can also specify the NODE_ENV if you want to test against a production/staging database.
$ NODE_ENV=true DEBUG=true swagger project start
This application uses a file config/env.json
locally to configure the DB/etc. Setup your file as below:
{
"dev": {
"db": {
"host": "localhost",
"user": "REDACTED",
"password": "REDACTED",
"db": "goalsappdev"
}
},
"prod": {
}
}
This application uses tape to run unit-tests found in the tests
directory. To run the tests:
$ tape tests/**/*.js | node_modules/.bin/tap-spec
Deploys are currently handled in heroku. Once a feature has been pushed to master, use the build feature on heroku to complete the deploy process.
-
Add web-token auth. Possible tutorial to follow.
-
Add staging deploy environment