Bun app
Run TypeScript or JavaScript services on Bun from files or a GitHub repo.
- app
- language
Guides: Run your own app, Run a GitHub repo
Run it
briq run bunbriq_run({ recipe: "bun", wait: true })curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "bun",
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "APP_URL": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"stack: app
services:
app:
recipe: bun
# its defaults, each a field you can set:
# image: oven/bun:1-slim
# ports: [8080]
# size: smallFields
| Name | Type | Options | Default |
|---|---|---|---|
| image | string | — | "oven/bun:1-slim" |
| files | record | { "path": "content" | { base64 } } | — |
| checkout | object | { repo, ref?, path?, token? } | — |
| steps | object[] | — | — |
| cmd | string | string[] | — | — |
| ports | number[] | — | [8080] |
| env | record | { key: string | { secret, value?, literal?, scope?, hosts?, locations? } } | {} |
| size | enum | nano, small, medium, large | "small" |
| volume | object | { gb? } | — |
| egress | object | { hosts } | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- APP_URL
- http://app.<stack>.internal:8080
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| app | oven/bun:1-slim | 8080 | small | — |
When to use it
- You have TypeScript and want it running without a compile step or an image.
- A small API or webhook receiver, where
Bun.serveis all the framework you need.
Tips
- Code in a repo: pass
checkout: { repo: "github.com/owner/app" }instead offiles. See Run a GitHub repo. - Pass the code as
files:{ "server.ts": "…", "package.json": "…" }. Relative paths go under/app, written before the app starts and again whenever it starts over. package.jsonis installed at each start;packages: ["hono"]adds more. They stay on the disk, so restarts are quick.startis the command when it is notbun run server.ts.- Listen on
::and onprocess.env.PORT(8080 by default):Bun.serve({ hostname: "::" }). - Publish it as you run it with
expose: "private"(or"public"for anyone): it returnsURL. - Step by step: Run your own app, with a database and a URL.