-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
188 lines (165 loc) · 3.77 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
service: pact
custom:
secrets: ${file(secrets.json)}
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: us-east-2
environment:
JWT_SECRET: ${self:custom.secrets.JWT_SECRET}
DB_HOST: ${self:custom.secrets.DB_HOST}
DB_USER: ${self:custom.secrets.DB_USER}
DB_PASSWORD: ${self:custom.secrets.DB_PASSWORD}
DB: ${self:custom.secrets.DB}
NEO4J_HOST: ${self:custom.secrets.NEO4J_HOST}
NEO4J_USER: ${self:custom.secrets.NEO4J_USER}
NEO4J_PASSWORD: ${self:custom.secrets.NEO4J_PASSWORD}
functions:
verify-token:
handler: auth/VerifyToken.auth
login:
handler: auth/AuthHandler.login
events:
- http:
path: login
method: post
cors: true
register:
handler: auth/AuthHandler.register
events:
- http:
path: register
method: post
cors: true
getInfo:
handler: auth/AuthHandler.getInfo
events:
- http:
path: getuserinfo
method: get
cors: true
# pacts
getUserPacts:
handler: pact/PactHandler.getUserPacts
events:
- http:
path: getuserpacts
method: get
cors: true
getPactInfo:
handler: pact/PactHandler.getPactInfo
events:
- http:
path: getpactinfo
method: get
cors: true
createPact:
handler: pact/PactHandler.createPact
events:
- http:
path: createpact
method: post
cors: true
deletePact:
handler: pact/PactHandler.deletePact
events:
- http:
path: deletepact
method: delete
cors: true
updatePact:
handler: pact/PactHandler.updatePact
events:
- http:
path: updatepact
method: put
cors: true
checkIn:
handler: pact/PactHandler.checkIn
events:
- http:
path: pact/checkin
method: post
cors: true
getCheckIns:
handler: pact/PactHandler.getCheckIns
events:
- http:
path: pact/getcheckins
method: post
acceptPact:
handler: pact/PactHandler.acceptPact
events:
- http:
path: acceptpact
method: put
cors: true
declinePact:
handler: pact/PactHandler.declinePact
events:
- http:
path: declinepact
method: put
cors: true
# friends
get-friends:
handler: friends/FriendsHandler.getFriends
events:
- http:
path: friends
method: get
cors: true
get-requests:
handler: friends/FriendsHandler.getRequests
events:
- http:
path: friends/request
method: get
cors: true
send-request:
handler: friends/FriendsHandler.sendRequest
events:
- http:
path: friends/request/send
method: post
cors: true
accept-request:
handler: friends/FriendsHandler.acceptRequest
events:
- http:
path: friends/request/accept
method: post
cors: true
decline-request:
handler: friends/FriendsHandler.declineRequest
events:
- http:
path: friends/request/decline
method: post
cors: true
search-users:
handler: friends/FriendsHandler.searchUsers
events:
- http:
path: friends/search
method: get
cors: true
request:
parameters:
querystrings:
prefix: true
limit: false
suggest-users:
handler: friends/FriendsHandler.suggestUsers
events:
- http:
path: friends/suggest
method: get
cors: true
request:
parameters:
querystrings:
limit: false
plugins:
- serverless-offline