A template to create projects using Kurier, served with Koa and a Postgres database.
Features include:
- JavaScript (Native ESM) environment, linted with Prettier
- Pre-configured user authentication
- Koa HTTP transport layer
- Postgres database available via
docker-compose
- HTTP logs via
logepi
Click right here or use GitHub CLI:
gh repo create my-api -p kurierjs/kurier-starter-pack-javascript
- Run
npm install
to install all dependencies. - Run
docker-compose up -d
to start a daemonized Docker container with a Postgres database. - Run
yarn start:dev
and execute a request towardshttp://localhost:3000
.
start:dev
runs the API in a local environment usingnodemon
.migrate:make <name>
creates a Knex migration file indata/migrations/<timestamp>_<name>.js
.migrate:latest
runs all pending migrations.migrate:rollback
reverts the last set of migrations.seed:make <name>
creates a Knex seed file indata/seeds/<name>.js
.seed:run
executes all seed files.
MIT