@chile-sh/jobs-common

Common helpers, configs, and constants used across the Jobs project

Usage no npm install needed!

<script type="module">
  import chileShJobsCommon from 'https://cdn.skypack.dev/@chile-sh/jobs-common';
</script>

README

jobs-common

Common helpers, configs, and constants used across the Jobs project

Install

yarn add @chile-sh/jobs-common

Env variables

PG_HOST, PG_USER, and PG_PASS are required to run migrations.

Other env variables should be inherited from outside.

NODE_ENV=development
RMQ_HOST=rabbitmq
RMQ_USER=admin
RMQ_PASS=admin
PG_HOST=postgres
PG_USER=postgres
PG_PASS=postgres
REDIS_HOST=redis
REDIS_PASS=redis
SENTRY_DSN=https://...@sentry.io/1234

DigitalOcean Spaces

mkdir ~/.aws && touch ~/.aws/credentials

Edit the credentials file with your access and secret keys:

nano ~/.aws/credentials
[default]
aws_access_key_id=...
aws_secret_access_key=...

Database

Use knex with:

yarn knex

e.g:

yarn knex seed:make getonbrd -x ts # use TypeScript

Migrations

yarn db:migrate && yarn db:seed

yarn db:rollback

Development

yarn global add yalc

yarn build && yalc publish

Then, on the external project:

yalc link @chile-sh/jobs-common

License

GNU General Public License v3.0