@@ -9,13 +9,14 @@ provider:
9
9
name : aws
10
10
runtime : nodejs12.x
11
11
profile : serverless
12
- stage : test
12
+ stage : dev
13
13
region : us-east-1
14
14
15
15
custom :
16
16
stage : ${opt:stage, self:provider.stage}
17
17
domainName : ${self:custom.domainNameStage.${self:custom.stage}}
18
18
domainNameStage :
19
+ dev : dev-api.${self:custom.baseDomainName}
19
20
test : test-api.${self:custom.baseDomainName}
20
21
prod : api.${self:custom.baseDomainName}
21
22
baseDomainName : CHANGEME
@@ -25,84 +26,93 @@ custom:
25
26
basePath : CHANGEME
26
27
stage : ${self:custom.stage}
27
28
createRoute53Record : true
29
+ environmentValues : ${self:custom.environmentValuesStage.${self:custom.stage}}
30
+ environmentValuesStage :
31
+ dev :
32
+ NODE_ENV : development
33
+ test :
34
+ NODE_ENV : test
35
+ prod :
36
+ NODE_ENV : production
37
+
28
38
documentation :
29
39
info :
30
40
title : CHANGEME
31
41
description : CHANGEME
32
42
version : 1.0.0
33
43
models :
34
- - name : DataInput
35
- description : Data input for the application
36
- contentType : application/json
37
- schema :
38
- type : object
44
+ - name : DataInput
45
+ description : Data input for the application
46
+ contentType : application/json
47
+ schema :
48
+ type : object
39
49
40
- - name : DataOutput
41
- description : Response message
42
- contentType : application/json
43
- schema :
44
- type : object
50
+ - name : DataOutput
51
+ description : Response message
52
+ contentType : application/json
53
+ schema :
54
+ type : object
45
55
46
- - name : ErrorResponse
47
- description : Error response from the application
48
- contentType : application/json
49
- schema :
50
- type : object
51
- properties :
52
- error :
53
- type : string
54
- description : Error message
56
+ - name : ErrorResponse
57
+ description : Error response from the application
58
+ contentType : application/json
59
+ schema :
60
+ type : object
61
+ properties :
62
+ error :
63
+ type : string
64
+ description : Error message
55
65
56
66
functions :
57
67
CHANGEME :
58
68
handler : dist/events/CHANGEME.handler
59
69
events :
60
- - http :
61
- path : /
62
- method : get
63
- cors : true
64
- documentation :
65
- summary : CHANGEME
66
- description : CHANGEME
67
- methodResponses :
68
- - statusCode : ' 200'
69
- responseBody :
70
- description : Successful operation
71
- responseModels :
72
- " application/json " : DataOutput
73
- - statusCode : ' 400'
74
- responseBody :
75
- description : Invalid input provided
76
- responseModels :
77
- " application/json " : ErrorResponse
78
- - statusCode : ' 500'
79
- responseBody :
80
- description : Unhandled error
81
- responseModels :
82
- " application/json " : ErrorResponse
70
+ - http :
71
+ path : /
72
+ method : get
73
+ cors : true
74
+ documentation :
75
+ summary : CHANGEME
76
+ description : CHANGEME
77
+ methodResponses :
78
+ - statusCode : ' 200'
79
+ responseBody :
80
+ description : Successful operation
81
+ responseModels :
82
+ ' application/json ' : DataOutput
83
+ - statusCode : ' 400'
84
+ responseBody :
85
+ description : Invalid input provided
86
+ responseModels :
87
+ ' application/json ' : ErrorResponse
88
+ - statusCode : ' 500'
89
+ responseBody :
90
+ description : Unhandled error
91
+ responseModels :
92
+ ' application/json ' : ErrorResponse
83
93
84
- - http :
85
- path : /
86
- method : post
87
- cors : true
88
- documentation :
89
- summary : CHANGEME
90
- description : CHANGEME
91
- requestModels :
92
- " application/json " : DataInput
93
- methodResponses :
94
- - statusCode : ' 200'
95
- responseBody :
96
- description : Successful operation
97
- responseModels :
98
- " application/json " : DataOutput
99
- - statusCode : ' 400'
100
- responseBody :
101
- description : Invalid input provided
102
- responseModels :
103
- " application/json " : ErrorResponse
104
- - statusCode : ' 500'
105
- responseBody :
106
- description : Unhandled error
107
- responseModels :
108
- " application/json " : ErrorResponse
94
+ - http :
95
+ path : /
96
+ method : post
97
+ cors : true
98
+ documentation :
99
+ summary : CHANGEME
100
+ description : CHANGEME
101
+ requestModels :
102
+ ' application/json ' : DataInput
103
+ methodResponses :
104
+ - statusCode : ' 200'
105
+ responseBody :
106
+ description : Successful operation
107
+ responseModels :
108
+ ' application/json ' : DataOutput
109
+ - statusCode : ' 400'
110
+ responseBody :
111
+ description : Invalid input provided
112
+ responseModels :
113
+ ' application/json ' : ErrorResponse
114
+ - statusCode : ' 500'
115
+ responseBody :
116
+ description : Unhandled error
117
+ responseModels :
118
+ ' application/json ' : ErrorResponse
0 commit comments