-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
54 lines (49 loc) · 1.1 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
service: "scryfall-api"
provider:
name: aws
runtime: "nodejs12.x"
region: "us-west-2"
stage: ${opt:stage, "dev"}
environment:
stage: ${self:provider.stage}
PORT: 1337
ENGINE_API_KEY: ${env:ENGINE_API_KEY, param:ENGINE_API_KEY}
URL:
{
"Fn::Join":
[
"",
[
" https://",
{ "Ref": "ApiGatewayRestApi" },
".execute-api.${self:provider.region}.amazonaws.com/${self:provider.stage}",
],
],
}
plugins:
- "serverless-dotenv-plugin"
- "serverless-webpack"
- "serverless-offline"
package:
exclude:
- "./ node_modules/**"
- "./.eslintrc.js"
- "./.babelrc.js"
- "./apollo.config.js"
- "./jest.config.js"
- "./tsconfig.json"
- "./webpack.*.js"
custom:
serverless-offline:
httpPort: ${self:provider.environment.PORT}
webpack:
includeModules: true
webpackConfig: "webpack.lambda.js"
functions:
graphql:
handler: "lambda/scryfall-api.handler"
events:
- http:
path: "/{proxy+}"
method: any
cors: true