-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.ts
34 lines (28 loc) · 807 Bytes
/
index.ts
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
import * as sst from '@serverless-stack/resources'
import { AuthStack } from './AuthStack'
import { DataStack } from './DataStack'
import { WebStack } from './WebStack'
import { ApiStack } from './ApiStack'
export interface MultiStackProps extends sst.StackProps {
auth?: sst.Auth
table?: sst.Table
api?: sst.Api
}
export default function main(app: sst.App): void {
app.setDefaultFunctionProps({
runtime: 'nodejs14.x',
})
const authStack = new AuthStack(app, 'AuthStack')
const dataStack = new DataStack(app, 'DataStack', {
auth: authStack.auth,
})
const apiStack = new ApiStack(app, 'ApiStack', {
table: dataStack.table,
auth: authStack.auth,
})
new WebStack(app, 'WebStack', {
table: dataStack.table,
auth: authStack.auth,
api: apiStack.api,
})
}