-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
executable file
·75 lines (70 loc) · 1.95 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
# Serverless.yml is the configuration the CLI
# uses to deploy your code to your provider of choice
# The `service` block is the name of the service
service: glassfrog-api
# The `provider` block defines where your service will be deployed
provider:
name: aws
runtime: nodejs8.10
region: eu-west-1
responseMappings: &response_mappings
headers:
Content-Type: "'application/json'"
statusCodes:
200:
pattern: ''
headers:
Access-Control-Allow-Origin: "'*'"
template:
application/json: ""
400:
pattern: 'Bad Request: .*'
headers:
Access-Control-Allow-Origin: "'*'"
template:
application/json: ""
401:
pattern: 'Unauthorized: .*'
headers:
Access-Control-Allow-Origin: "'*'"
template:
application/json: ""
403:
pattern: 'Forbidden: .*'
headers:
Access-Control-Allow-Origin: "'*'"
template:
application/json: ""
404:
pattern: 'Not Found: .*'
headers:
Access-Control-Allow-Origin: "'*'"
template:
application/json: ""
500:
pattern: 'Error: .*'
headers:
Access-Control-Allow-Origin: "'*'"
# The `functions` block defines what code to deploy
functions:
proxy:
environment:
API_TOKEN: ${env:API_TOKEN}
handler: handler.roles
# The `events` block defines how to trigger the handler.slack code
events:
- http:
method: get
path: /roles
integration: lambda
cors: true
request:
parameters:
paths:
repo: true
querystrings:
labels: false
passThrough: WHEN_NO_TEMPLATES
response: *response_mappings