-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
222 lines (204 loc) · 5.51 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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
service: godiet
frameworkVersion: '3'
plugins:
- serverless-esbuild
- serverless-offline
- serverless-dotenv-plugin
package:
individually: true
excludeDevDependencies: true
patterns:
- '!node_modules/.prisma/client/libquery_engine-*'
- 'node_modules/.prisma/client/libquery_engine-rhel-*'
- '!node_modules/prisma/libquery_engine-*'
- '!node_modules/@prisma/engines/**'
provider:
name: aws
runtime: nodejs18.x
memorySize: 512
httpApi:
cors:
allowedOrigins:
- 'https://godiet.com.br'
- 'http://localhost:5173'
- 'https://app.godiet.com.br'
allowedHeaders:
- '*'
allowedMethods:
- PUT
- GET
- DELETE
- POST
- OPTIONS
custom:
secrets: ${file(.env.prod)}
esbuild:
target: node20
# format: esm
minify: true
# outputFileExtension: .mjs
# banner:
# js: 'import { createRequire } from "module";const require = createRequire(import.meta.url)'
functions:
authSignin:
handler: src/server/functions/auth/signin.handler
events:
- httpApi:
path: /auth/signin
method: POST
authSignup:
handler: src/server/functions/auth/signup.handler
events:
- httpApi:
path: /auth/signup
method: POST
createPatient:
handler: src/server/functions/patient/create.handler
events:
- httpApi:
path: /patient
method: POST
findAllPatients:
handler: src/server/functions/patient/findAll.handler
events:
- httpApi:
path: /patient
method: GET
findByPatientId:
handler: src/server/functions/patient/findByPatientId.handler
events:
- httpApi:
path: /patient/{patientId}
method: GET
updatePatient:
handler: src/server/functions/patient/update.handler
events:
- httpApi:
path: /patient/{patientId}
method: PUT
deletePatient:
handler: src/server/functions/patient/delete.handler
events:
- httpApi:
path: /patient/{patientId}
method: DELETE
findAllFavoriteMeal:
handler: src/server/functions/favoriteMeal/findAll.handler
events:
- httpApi:
path: /favoriteMeal
method: GET
deleteFavoriteMeal:
handler: src/server/functions/favoriteMeal/delete.handler
events:
- httpApi:
path: /favoriteMeal/{favoriteMealId}
method: DELETE
createFavoriteMeal:
handler: src/server/functions/favoriteMeal/create.handler
events:
- httpApi:
path: /favoriteMeal
method: POST
findAllFoods:
handler: src/server/functions/food/findAll.handler
events:
- httpApi:
path: /foods
method: GET
createPlanningMeal:
handler: src/server/functions/planningMeal/create.handler
events:
- httpApi:
path: /planningMeal/{patientId}
method: POST
deletePlanningMeal:
handler: src/server/functions/planningMeal/delete.handler
events:
- httpApi:
path: /planningMeal/{patientId}
method: DELETE
updatePlanningMeal:
handler: src/server/functions/planningMeal/update.handler
events:
- httpApi:
path: /planningMeal/{patientId}
method: PUT
findAllPlanning:
handler: src/server/functions/planningMeal/findAll.handler
events:
- httpApi:
path: /planningMeal/{patientId}
method: GET
createObservationTemplate:
handler: src/server/functions/observationTemplate/create.handler
events:
- httpApi:
path: /observation-template
method: POST
deleteObservationTemplate:
handler: src/server/functions/observationTemplate/delete.handler
events:
- httpApi:
path: /observation-template/{id}
method: DELETE
findAllObservationTemplate:
handler: src/server/functions/observationTemplate/findAll.handler
events:
- httpApi:
path: /observation-template
method: GET
updateObservationTemplate:
handler: src/server/functions/observationTemplate/update.handler
events:
- httpApi:
path: /observation-template
method: PUT
createAnamnesisTemplate:
handler: src/server/functions/anamnesisTemplate/create.handler
events:
- httpApi:
path: /anamnesisTemplate
method: POST
findAllAnamnesisTemplate:
handler: src/server/functions/anamnesisTemplate/findAll.handler
events:
- httpApi:
path: /anamnesisTemplate
method: GET
deleteAnamnesisTemplate:
handler: src/server/functions/anamnesisTemplate/delete.handler
events:
- httpApi:
path: /anamnesisTemplate/{anamnesisId}
method: DELETE
createAnamnesis:
handler: src/server/functions/anamnesis/create.handler
events:
- httpApi:
path: /anamnesis/{patientId}
method: POST
findAllAnamnesis:
handler: src/server/functions/anamnesis/findAll.handler
events:
- httpApi:
path: /anamnesis/{patientId}
method: GET
updateAnamnesis:
handler: src/server/functions/anamnesis/update.handler
events:
- httpApi:
path: /anamnesis/{patientId}
method: PUT
deleteAnamnesis:
handler: src/server/functions/anamnesis/delete.handler
events:
- httpApi:
path: /anamnesis/{patientId}/{anamnesisId}
method: DELETE
userMe:
handler: src/server/functions/user/me.handler
events:
- httpApi:
path: /user/me
method: GET