-
Notifications
You must be signed in to change notification settings - Fork 3
/
bun.yml
34 lines (34 loc) · 993 Bytes
/
bun.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
source: clear
features:
- bun latest
nginx:
root: public_html/public
passenger:
enabled: "on"
app_start_command: env PORT=$PORT proxfix bun app.ts
commands:
- filename: app.ts
content: |
const html_text = `
<!DOCTYPE html>
<html>
<head>
<title>Bun App</title>
<link rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css">
</head>
<body class="p-5 text-center">
<p><img src="//images.unsplash.com/photo-1465153690352-10c1b29577f8?fit=crop&w=200&h=200"
class="img-fluid rounded-circle"></p>
<h1 class="mb-3">Hello, world!</h1>
<p>Serving from Bun version ${Bun.version}</p>
<p class="text-muted">DOM Cloud</p>
</body>
</html>
`
const server = Bun.serve({
fetch(request) {
return new Response(html_text, {
headers: { "Content-Type": "text/html" },
});
},
});