Skip to content
/ bun-typescript Public template

bun with typescript template

Notifications You must be signed in to change notification settings

leonardocbsr/bun-typescript

Repository files navigation

Bun CI License: MIT

Bun template with TypeScript

Bun template

This is a template for Bun with TypeScript.

Usage

$ bun run test
$ bun start

Creating a Domain

$ bun run create:domain <name>

And then you can create files under src/apps/:name. The script will add to tsconfig.json automatically under paths as

    "@<name>/<entity>/*": ["src/apps/<name>/<entity>/*"],

Features

  1. TypeScript
  2. ESLint
  3. Docker
  4. Docker Compose
  5. PostgreSQL
  6. Redis
  7. TypeORM
  8. Elysia

Structure

.
├── README.md
├── bun.config.ts
├── docker-compose.yml
├── package.json
├── src
│   ├── apps
│   │   ├── <domain>
│   │   │   ├── adapters
│   │   │   │   ├── http
│   │   │   │   │   ├── controllers
│   │   │   │   │   │   └── <entity>.controller.ts
│   │   │   │   │   └── routes
│   │   │   │   │   │   └── <entity>.route.ts
│   │   │   │   |   └── views
│   │   │   │   │   │   └── request
│   │   │   │   │   │   │   └── <entity>.requests.ts
│   │   │   │   │   │   └── response
│   │   │   │   │   │       └── <entity>.responses.ts
│   │   │   ├── repositories
│   │   │   │   └── <entity>.repository.ts
│   │   │   ├── applications
│   │   │   │   └── <entity>.service.ts
│   │   │   ├── models
│   │   │   │   └── <entity>.model.ts
│   ├── config
│   ├── commons
│   ├── errors
│   ├── logger
│   ├── server

TODO

  • Add tests to increase coverage to 100%