-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
68 lines (63 loc) · 1.76 KB
/
serverless.yml
File metadata and controls
68 lines (63 loc) · 1.76 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
service: sls-boilerplate-http
frameworkVersion: '2'
provider:
name: aws
stage: ${opt:stage, 'dev'}
lambdaHashingVersion: '20201221'
runtime: ${file(./configs/aws/awsconfig.${self:provider.stage}.json):RUNTIME}
region: ${file(./configs/aws/awsconfig.${self:provider.stage}.json):AWS_REGION}
custom:
memorysize: ${file(./configs/aws/awsconfig.${self:provider.stage}.json):MEM_SIZE}
timeout: ${file(./configs/aws/awsconfig.${self:provider.stage}.json):TIMEOUT}
serverless-offline:
httpPort: ${opt:port, 8080}
functions:
root:
handler:
- middlewares/bodyparser.bodyparser
- then: scripts/root.handler
memorySize: ${self:custom.memorysize}
timeout: ${self:custom.timeout}
description: Health Check
events:
- http:
path: /
method: get
login:
handler:
- middlewares/bodyparser.bodyparser
- then: scripts/login.handler
memorySize: ${self:custom.memorysize}
timeout: ${self:custom.timeout}
description: Login API
events:
- http:
path: /login
method: post
register:
handler:
- middlewares/bodyparser.bodyparser
- then: scripts/register.handler
memorySize: ${self:custom.memorysize}
timeout: ${self:custom.timeout}
description: Register API
events:
- http:
path: /register
method: post
getprofile:
handler:
- middlewares/bodyparser.bodyparser
- middlewares/authguard.authguard
- then: scripts/getProfile.handler
memorySize: ${self:custom.memorysize}
timeout: ${self:custom.timeout}
description: Get Profile
events:
- http:
path: /getprofile
method: get
plugins:
- serverless-middleware
- serverless-offline
- serverless-dotenv-plugin