-
Notifications
You must be signed in to change notification settings - Fork 8
/
serverless.yml
56 lines (49 loc) · 1.26 KB
/
serverless.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# NOTE: update this with your service name
service: serverless-graphql-typescript-starter
# Use the serverless-webpack plugin to transpile ES6
package:
individually: true
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-bundle
- serverless-offline
- serverless-dotenv-plugin
# serverless-webpack configuration
# Enable auto-packing of external modules
custom:
stage: ${opt:stage, self:provider.stage}
serverless-offline:
port: 4000
bundle:
linting: false
provider:
name: aws
runtime: nodejs12.x
stage: ${self:provider.environment.stage}
region: eu-west-1
profile: personalAccount
# To load environment variables externally
# rename env.example to env.yml and uncomment
# the following line. Also, make sure to not
# commit your env.yml.
#
#environment: ${file(env.yml):${self:provider.stage}}
environment:
stage: ${env:stage}
region: ${self:provider.region}
functions:
graphql:
handler: src/graphql.graphqlHandler
environment:
SLS_DEBUG: true
events:
- http:
path: graphql
method: post
cors: true
integration: lambda-proxy
- http:
path: graphql
method: get
cors: true
integration: lambda-proxy