Lets see where this goes. Right now it is a template for a jwt-secured Api backend.
We do not want to store secret or config information within the project itself. Thats why we need some environment variables. Add to your .profile file:
export DB_USER="YourDbUser" export DB_PASSWORD="YourDbPassword" export JWT_SECRET="YourJwtSecret"
and source ~/.profile
afterwords to include your values into your terminal.
We use db-migrate to mange the database changes.
For more details check the docs.
npm run migrate create <myMigration>
This will create a file in /migrations
folder where you can specify your up and down scripts.
npm run migrate up
This will update your database to the newest state.
npm run migrate down
This will remove the last migration.