本页还没有译文
本页 15 段还没译成Español,下面显示的是英文原文。Deploy a Bun application on Render
还没翻译译自英文(bun.com)本页 15 段都还没译
Render is a cloud platform for building, deploying, and scaling apps.
It provides auto deploys from GitHub, a global CDN, private networks, automatic HTTPS setup, and managed PostgreSQL and Redis-compatible Key Value stores.
Render supports Bun natively. You can deploy Bun apps as web services, background workers, cron jobs, and more.
As an example, this guide deploys an Express HTTP server to Render.
-
Step 1
Create a new GitHub repo named
myapp. Git clone it locally.git clone git@github.com:my-github-username/myapp.git cd myapp -
Step 2
Add the Express library.
bun add express -
Step 3
Define a server with Express:
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}...`); }); -
Step 4
Commit your changes and push to GitHub.
git add app.ts bun.lock package.json git commit -m "Create simple Express app" git push origin main -
Step 5
In your Render Dashboard, click
New>Web Serviceand connect yourmyapprepo. -
Step 6
In the Render UI, provide the following values during web service creation:
Runtime NodeBuild Command bun installStart Command bun app.ts
Once the build finishes, your web service is live at its assigned onrender.com URL.
View the deploy logs for details. See Render's documentation for more on deploys.