Template

Template to create a bun service

  • express web server
  • Connect to postgress DB
  • Drizzle for ORM and migrations
  • Logging via pino

To install dependencies:

bun install

To run:

bun start

To run in dev:

bun run dev

This project was created using bun init in bun v1.0.0. Bun is a fast all-in-one JavaScript runtime.

run following command to initiate migrations once a schema is setup

Create migrations using

bun run generate

Run migrations

bun run migrate

Access drizzle kit studio

bunx drizzle-kit studio

Build using docker

docker build  -t <tag-name> .

Run docker image

docker run --env-file .env -p <host-port>:<internal-port>  -t <tag-name>