Skip to content

Render 는 앱을 유연하게 빌드하고 배포하며 확장할 수 있는 클라우드 플랫폼입니다.

GitHub 에서 자동 배포 글로벌 CDN 프라이빗 네트워크 자동 HTTPS 설정 및 관리형 PostgreSQL 과 Redis 와 같은 기능을 제공합니다.

Render 는 Bun 을 기본적으로 지원합니다. Bun 앱을 웹 서비스 백그라운드 워커 크론 잡 등으로 배포할 수 있습니다.


예를 들어 간단한 Express HTTP 서버를 Render 에 배포해 보겠습니다.

1 단계

myapp 이라는 새 GitHub 저장소를 만듭니다. 로컬에 Git clone 합니다.

sh
git clone git@github.com:my-github-username/myapp.git
cd myapp

2 단계

Express 라이브러리를 추가합니다.

sh
bun add express

3 단계

Express 로 간단한 서버를 정의합니다:

ts
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}...`);
});

4 단계

변경사항을 커밋하고 GitHub 에 푸시합니다.

sh
git add app.ts bun.lock package.json
git commit -m "Create simple Express app"
git push origin main

5 단계

Render Dashboard 에서 New > Web Service 를 클릭하고 myapp 저장소를 연결합니다.

6 단계

Render UI 에서 웹 서비스 생성 시 다음 값을 제공합니다:

RuntimeNode
Build Commandbun install
Start Commandbun app.ts

이제 끝입니다! 빌드가 완료되면 할당된 onrender.com URL 에서 웹 서비스를 사용할 수 있습니다.

자세한 내용은 배포 로그 를 확인할 수 있습니다. Render 에서 배포에 대한 전체 개요는 Render 문서 를 참조하세요.

Bun by www.bunjs.com.cn 편집