Default Compas template
This project is created using the default template via create-compas.
shell
# Via NPM
npx create-compas@latest --template default
# Or with Yarn
yarn create compas --template default
Getting started
- Start up the development Postgres and Minio instances
compas docker up
- Apply the Postgres migrations
compas migrate
- Regenerate router, validators, types, sql, etc.
compas generate
/compas generate application
- Run the tests
compas test --serial
Structure and features
This project is structured according to the default Compas template.
- Uses
@compas/eslint-plugin
withcompas lint
for running ESLint and Prettier - Has code generation based on
@compas/code-gen
, with the definitions stored ingen/*
and a custom command incommands/generate.js
- Contains 'global' services via ES Module live bindings in
services/core.js
. - Entrypoint for both starting the api via
compas run api
/node ./scripts/api.js
and a background queue viacompas run queue
/node ./scripts/queue.js
. - Tests running on a temporary Postgres database, temporary S3 bucket and validating responses.