-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsst.config.ts
More file actions
38 lines (35 loc) · 796 Bytes
/
Copy pathsst.config.ts
File metadata and controls
38 lines (35 loc) · 796 Bytes
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
35
36
37
38
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: 'tanstack-monorepo',
removal: input?.stage === 'production' ? 'retain' : 'remove',
home: 'cloudflare',
providers: {
cloudflare: {},
aws: {},
},
}
},
async run() {
const hono = new sst.cloudflare.Worker('tanstack-monorepo-api', {
url: true,
handler: 'apps/api/src/index.ts',
})
// ! Tried to deploy to Cloudflare but doesn't appear to work
const spa = new sst.aws.StaticSite('tanstack-monorepo-spa-', {
path: 'apps/spa',
build: {
command: 'bun run build',
output: 'dist',
},
environment: {
VITE_API_URL: hono.url.apply((url) => url?.toString() ?? ''),
},
})
return {
api: hono.url,
spa: spa.url,
}
},
})