Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dayblox/bun
Bun starter
https://github.com/dayblox/bun
bun typescript
Last synced: 3 months ago
JSON representation
Bun starter
- Host: GitHub
- URL: https://github.com/dayblox/bun
- Owner: dayblox
- Created: 2023-09-09T13:28:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-13T10:01:01.000Z (3 months ago)
- Last Synced: 2024-08-13T22:52:07.865Z (3 months ago)
- Topics: bun, typescript
- Language: TypeScript
- Homepage: https://railway.app/template/G3k1Tv?referralCode=bonus
- Size: 2.93 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bun starter
![](../../actions/workflows/ci.yml/badge.svg)
[![](https://railway.app/button.svg)](https://railway.app/template/G3k1Tv?referralCode=bonus)
## Key Features
- [ TypeScript](https://www.typescriptlang.org/)
- [Typed environment variables](src/env.ts#L5)
- [ Bun](https://bun.sh/)
- [Debugging](.vscode/launch.json)
- [ESM & CommonJS compatibility](https://bun.sh/docs/runtime/modules#module-systems)
- [Fast package manager](https://bun.sh/docs/cli/install)
- [Fast runtime](https://bun.sh/docs/cli/run#performance)
- [Fast test runner](https://bun.sh/docs/cli/test#performance)
- [Highly optimized APIs](https://bun.sh/docs/runtime/bun-apis)
- [Hot reloading](https://bun.sh/docs/runtime/hot#hot-mode)
- [TypeScript first class support](https://bun.sh/docs/runtime/typescript)
- [ Biome](https://biomejs.dev/)
- [Fast formatting](https://github.com/biomejs/biome/tree/main/benchmark#formatting)
- [Fast linting](https://github.com/biomejs/biome/tree/main/benchmark#linting)
- [Import sorting](https://biomejs.dev/analyzer/import-sorting/)
- [ GitHub](https://github.com)
- [One click template](https://github.com/dayblox/bun/generate)
- [Continuous Integration](.github/workflows/ci.yml)## Prerequisites
- [ Bun](https://bun.sh/) `>=1.0.0`
- [All-in-one toolkit](https://bun.sh/docs)
- [JavaScript runtime](https://bun.sh/docs/cli/run)
- [Package manager](https://bun.sh/docs/cli/install)
- [Test runner](https://bun.sh/docs/cli/test)
- [Bundler](https://bun.sh/docs/bundler)## Getting Started
1. **[Deploy on Railway](https://railway.app/template/G3k1Tv?referralCode=bonus)** or **[use this template](https://github.com/dayblox/bun/generate)**
2. **Clone** the repository
3. **Install** dependencies
```sh
bun i
```#
_Optionally_ typecheck environment variables
`.env`
```env
PORT=3000
````src/env.ts` ([docs](https://elysiajs.com/validation/elysia-type.html))
```ts
const env = t.Object({
PORT: t.Numeric({ minimum: 1024, maximum: 65535 }),
});
```## Usage
- **Development** mode (**debug**)
`F5`
- Running **tests** (**watch** mode)
```sh
bun test --watch
```- **Production** mode
```sh
bun start
```