Deploy a Bun application on Render
Render is a cloud platform that lets you flexibly build, deploy, and scale your apps.
It offers features like auto deploys from GitHub, a global CDN, private networks, automatic HTTPS setup, and managed PostgreSQL and Redis.
Render supports Bun natively. You can deploy Bun apps as web services, background workers, cron jobs, and more.
As an example, let's deploy a simple Express HTTP server to Render.
```sh theme={"theme":{"light":"github-light","dark":"dracula"}}
git clone git@github.com:my-github-username/myapp.git
cd myapp
```
```sh theme={"theme":{"light":"github-light","dark":"dracula"}}
bun add express
```
```ts app.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import express from "express";
const app = express();
const port = process.env.PORT || 3001;
app.get("/", (req, res) => {
res.send("Hello World!");
});
app.listen(port, () => {
console.log(`Listening on port ${port}...`);
});
```
```sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
git add app.ts bun.lock package.json
git commit -m "Create simple Express app"
git push origin main
```
| | |
| ----------------- | ------------- |
| **Runtime** | `Node` |
| **Build Command** | `bun install` |
| **Start Command** | `bun app.ts` |
That's it! Your web service will be live at its assigned onrender.com URL as soon as the build finishes.
You can view the deploy logs for details. Refer to Render's documentation for a complete overview of deploying on Render.