A template to create projects using Kurier, served with Koa and a Postgres database.
Features include:
- TypeScript 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-typescript
- 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 usingts-node-dev
.migrate:make <name>
creates a Knex migration file indata/migrations/<timestamp>_<name>.ts
.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>.ts
.seed:run
executes all seed files.
MIT