forked from swarmion/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsharedConfig.ts
48 lines (44 loc) · 1.26 KB
/
sharedConfig.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export const projectName = 'sls-monorepo';
export const region = 'eu-west-1';
export const defaultEnvironment = 'dev';
export const sharedProviderConfig = {
name: 'aws',
runtime: 'nodejs14.x',
architecture: 'arm64',
region,
profile: '${self:custom.sharedEnvsConfig.${self:provider.stage}.profile}', // Used to point to the right AWS account
stage: "${opt:stage, 'dev'}", // Doc: https://www.serverless.com/framework/docs/providers/aws/guide/credentials/
lambdaHashingVersion: '20201221',
environment: {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
NODE_OPTIONS: '--enable-source-maps --stack-trace-limit=1000',
},
eventBridge: {
useCloudFormation: true,
},
} as const;
export const sharedEnvsConfig = {
dev: {
profile: 'sls-monorepo-developer',
apiGatewayCorsAllowedOrigins: ['http://localhost:3000'],
},
staging: {
profile: '',
apiGatewayCorsAllowedOrigins: ['https://staging.my-domain.com'],
},
production: {
profile: '',
apiGatewayCorsAllowedOrigins: ['https://www.my-domain.com'],
},
};
export const sharedEsbuildConfig = {
packager: 'yarn',
bundle: true,
minify: false,
sourcemap: true,
exclude: ['aws-sdk'],
target: 'node14',
platform: 'node',
mainFields: ['module', 'main'],
concurrency: 5,
};