In order to speed up local development, env vars can be written to a .env
file instead of being requested each time the server process starts.
A helper file is included to write the necessary values to the .env
file:
./bin/write-env laptop-sticker-friends
You'll want to use a local database if your editing the schema or making other data changes. If not you can use the $DATABASE_URL
written to your .env
file above.
Create a config/local.json
file with your local database information like this. You'll need to make sure this database table is created locally.
{
"db": {
"user": "lukekarrys",
"database": "friends-from-the-trail"
}
}
And then run migrations and seeds to setup the database with the required data:
npx knex migrate:latest
npx knex seed:run
Create a config/local.json
with the following and then it will use the server database connection from the .env
file:
{
"db": "${DATABASE_URL}?ssl=true"
}
npm start
If you want to simulate production
NODE_ENV=production npm start
The client files in app/
will be built along with each deploy.
Required topics are listed in config/default.json#kafka
. They can be created by running:
heroku kafka:topics:create "$(heroku config:get KAFKA_PREFIX)submission-app"
heroku kafka:topics:create "$(heroku config:get KAFKA_PREFIX)change-background"
The design contains a flag that will be changed depending on the REGION
environment variable. The possible values are: dublin
, frankfurt
, oregon
, sydney
, tokyo
, virginia
. If no valid value is set then it will default to a Heroku flag.