Scribe runs various background jobs and syncs data from the CMS into read-only tables in the API database.
Make sure you configure the webhook according to the steps in the CMS readme.
Ensure the .env
file is configured. Use the .env.example
as a base.
To (drop and re-)create the database, run:
nx drop scribe
Apply all DB migrations:
nx run scribe:migrate:latest
Start via:
nx serve scribe
Build via:
nx build scribe
scripts/ # Utility scripts
src/ # Main source code
configuration/ # Environment configurations
languages/ # Translations
migrations/ # Database migrations
modules/ # API service layer (routes, handlers, db interactions)
# tasks/ has been moved to `libs/shared/queues`
... # various dot files and configuration for the project
Any updates to database models should be accompanied by a database migrations (see existing migrations in ./apps/scribe/src/migrations
for inspiration). Each migration must include a downward migration in case a rollback is needed.
Each of the following is mapped to the corresponding Knex migration command:
nx run scribe:migrate:up
nx run scribe:migrate:down
nx run scribe:migrate:latest
nx run scribe:migrate:rollback
nx run scribe:migrate:status
nx run scribe:migrate:list
nx run scribe:migrate:currentVersion
nx run scribe:migrate:make --args="--name=NewMigrationName"