-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
143 lines (140 loc) · 3.54 KB
/
serverless.yml
File metadata and controls
143 lines (140 loc) · 3.54 KB
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
org: qtran
app: realworld-lambda
service: realworld-lambda
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs18.x
environment:
JWT_TOKEN_KEY: ${param:jwt}
DB_HOST: ${param:DB_HOST}
DB_PORT: ${param:DB_PORT}
DB_USERNAME: ${param:DB_USERNAME}
DB_PASSWORD: ${param:DB_PASSWORD}
DB_DATABASE: ${param:DB_DATABASE}
stage: development
region: ap-southeast-1
functions:
signIn:
handler: src/users/login.login
events:
- httpApi:
path: /api/users/login
method: post
signUp:
handler: src/users/register.register
events:
- httpApi:
path: /api/users
method: post
whoAmI:
handler: src/users/whoAmI.whoAmI
events:
- httpApi:
path: /api/users/me
method: post
updateCurrentUser:
handler: src/users/updateUser.updateUser
events:
- httpApi:
path: /api/users/me
method: put
getListFollowers:
handler: src/profiles/getListFollowers.getListFollowers
events:
- httpApi:
path: /api/profiles/{username}/followers
method: get
getProfile:
handler: src/profiles/getProfile.getProfile
events:
- httpApi:
path: /api/profiles/{username}
method: get
followUser:
handler: src/profiles/followUser.followUser
events:
- httpApi:
path: /api/profiles/{username}/follow
method: post
unFollowUser:
handler: src/profiles/unFollowUser.unFollowUser
events:
- httpApi:
path: /api/profiles/{username}/follow
method: delete
getArticles:
handler: src/articles/getArticles.getArticles
events:
- httpApi:
path: /api/articles
method: get
getFeed:
handler: src/articles/getFeedArticles.getFeedArticles
events:
- httpApi:
path: /api/articles/feed
method: get
getArticleBySlug:
handler: src/articles/getArticleBySlug.getArticleBySlug
events:
- httpApi:
path: /api/articles/{slug}
method: get
createArticle:
handler: src/articles/createArticle.createArticle
events:
- httpApi:
path: /api/articles
method: post
updateArticle:
handler: src/articles/updateArticle.updateArticle
events:
- httpApi:
path: /api/articles/{slug}
method: put
deleteArticle:
handler: src/articles/deleteArticle.deleteArticle
events:
- httpApi:
path: /api/articles/{slug}
method: delete
addComment:
handler: src/articles/addCommentToArticle.addCommentToArticle
events:
- httpApi:
path: /api/articles/{slug}/comments
method: post
getComments:
handler: src/articles/getCommentsFromArticle.getCommentsFromArticle
events:
- httpApi:
path: /api/articles/{slug}/comments
method: get
deleteComment:
handler: src/articles/deleteComment.deleteComment
events:
- httpApi:
path: /api/articles/comments/{id}
method: delete
favoriteArticle:
handler: src/articles/favoriteArticle.favoriteArticle
events:
- httpApi:
path: /api/articles/{slug}/favorite
method: post
unFavoriteArticle:
handler: src/articles/unFavoriteArticle.unFavoriteArticle
events:
- httpApi:
path: /api/articles/{slug}/favorite
method: delete
getTags:
handler: src/tags.tags
events:
- httpApi:
path: /api/tags
method: get
plugins:
- serverless-plugin-typescript
- serverless-offline