-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
134 lines (130 loc) Β· 3.18 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
service: bamboo-server
useDotenv: true
frameworkVersion: "2"
provider:
name: aws
runtime: nodejs14.x
lambdaHashingVersion: 20201221
region: ap-northeast-2
stage: test
resources:
Resources:
GatewayResponseDefault4XX:
Type: "AWS::ApiGateway::GatewayResponse"
Properties:
ResponseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_4XX
RestApiId:
Ref: "ApiGatewayRestApi"
GatewayResponseDefault5XX:
Type: "AWS::ApiGateway::GatewayResponse"
Properties:
ResponseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_5XX
RestApiId:
Ref: "ApiGatewayRestApi"
functions:
getKindOfAlgorithemCount:
handler: src/handler.getStatusList
events:
- http:
path: post/count
method: get
cors: true
getAlgorithemList:
handler: src/handler.getAlgorithemList
events:
- http:
path: post/AlgorithemList
method: get
cors: true
getAlgorithemPage:
handler: src/handler.getAlgorithemListAtPages
events:
- http:
path: post/AlgorithemPage
method: get
cors: true
createAlgorithem:
handler: src/handler.postAlgorithem
events:
- http:
path: post/create
method: post
cors: true
changeStatusAlgorithem:
handler: src/handler.setAlgorithemStatus
events:
- http:
path: post/{id}/setStatus
method: post
cors: true
modifyAlgorithem:
handler: src/handler.modifyAlgorithem
events:
- http:
path: post/{id}/modify
method: patch
cors: true
reportAlgorithem:
handler: src/handler.reportAlogorithem
events:
- http:
path: post/{id}/report
method: patch
cors: true
deleteAlgorithem:
handler: src/handler.deleteAlgorithem
events:
- http:
path: post/{id}/delete
method: delete
cors: true
getAlgorithemRules:
handler: src/handler.getAlgorithemRules
events:
- http:
path: post/rule
method: get
cors: true
getAlgorithemRulesForWeb:
handler: src/handler.getAlgorithemRulesForWeb
events:
- http:
path: post/rule/web
method: get
cors: true
auth:
handler: src/handler.authAdmin
events:
- http:
path: auth
method: post
cors: true
verify:
handler: src/handler.getVerifyQuestion
events:
- http:
path: verify
method: get
cors: true
plugins:
- serverless-plugin-typescript
- serverless-dotenv-plugin
- serverless-offline
custom:
dotenv:
required:
env:
- MONGO_URL
- DISCORD_ACCEPTED_WEBHOOK
- DISCORD_RECJECTED_WEBHOOK
- DISCORD_REPORT_WEBHOOK
- DISCORD_MANAGEMENT_WEBHOOK
- DISCORD_ABOUT_DELETE_WEBHOOK
- ADMIN_PASSWORD
- JWT_SECRET