-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
50 lines (44 loc) · 1.28 KB
/
serverless.yml
File metadata and controls
50 lines (44 loc) · 1.28 KB
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
49
50
custom:
webpack:
includeModules: true
service:
name: typegrahql
plugins:
- serverless-webpack
- serverless-offline # This should be the last in the list
provider:
name: aws
region: ${env:REGION, "us-east-2"}
profile: ${env:PROFILE, "typegrahql"}
runtime: nodejs8.10
memorySize: 512 # optional, in MB, default is 1024
role: LambdaRole
versionFunctions: false
environment:
GRAPHQL_API_PATH: "/api"
CORS_ORIGIN: ${env:CORS_ORIGIN}
DBURL: ${env:DBURL}
LOG_LEVEL: ${env:LOG_LEVEL}
JWT_AUTH_SECRET: ${env:JWT_AUTH_SECRET}
PASSWORD_SALT: ${env:PASSWORD_SALT}
NODE_ENV: ${env:NODE_ENV}
IS_OFFLINE: ${env:IS_OFFLINE}
SES_EMAIL_SENDER: ${env:SES_EMAIL_SENDER}
NODEMAILER_TRANSPORT: ${env:NODEMAILER_TRANSPORT}
S3_IMAGE_BUCKET_NAME: ${opt:stage, "dev"}-avatar
functions:
graphQLAPI:
handler: handler.graphql
events:
- http:
method: post
path: "/api"
cors: true
# Not to be deployed on production
graphQLPlayground:
handler: handler.playgroundHandler
events:
- http:
method: get
path: "/playground"
cors: true