Project to manage github repos
Get the latest version of node from the official website or using nvm Nvm approach is preferred.
Run npm install
or yarn
from rootpath of the project.
Run node ./scripts/kick-off.js
from project's rootpath to remove the existing sample project and start developing your app.
Before running the app, make sure you must have a postgres db created. Then, set the $NODE_API_DB_URL
environmental variable. It should look something like: postgres://username:password@host:port/databasename
.
For more information feel free to glance at the app/orm.js
file.
To create a migration, run ./node_modules/.bin/sequelize migration:create --name="my-migration-name" --config ./migrations/config.js --migrations-path ./migrations/migrations
.
To run them, execute npm run migrations
.
Now, to start your app run npm start
in the rootpath of the project. Then access your app at localhost:port. The port is logged in the console where you ran the start script.
By default, the environment will be development, but you can easily change it using the NODE_ENV environmental variable.
As we know, a NodeJS application is not something easy to debug and because of that we've added the --inspect
flag to make it simpler. Chrome DevTools will get started when running your app using the start script (npm start
), making your debugging easier.
Documentation will be served at /docs
. Remember using dictum.js package to automatically generate documentation for your endpoints. Check this link for further details.
Pushing the desired branch to heroku should be enough. For more information check: https://devcenter.heroku.com/articles/getting-started-with-nodejs#define-a-procfile.
This project is maintained by Wolox and it was written by Wolox.