Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit a728f44

Browse files
committed
updated environment variables and default stage
1 parent f47a040 commit a728f44

File tree

1 file changed

+78
-68
lines changed

1 file changed

+78
-68
lines changed

serverless.yml

Lines changed: 78 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ provider:
99
name: aws
1010
runtime: nodejs12.x
1111
profile: serverless
12-
stage: test
12+
stage: dev
1313
region: us-east-1
1414

1515
custom:
1616
stage: ${opt:stage, self:provider.stage}
1717
domainName: ${self:custom.domainNameStage.${self:custom.stage}}
1818
domainNameStage:
19+
dev: dev-api.${self:custom.baseDomainName}
1920
test: test-api.${self:custom.baseDomainName}
2021
prod: api.${self:custom.baseDomainName}
2122
baseDomainName: CHANGEME
@@ -25,84 +26,93 @@ custom:
2526
basePath: CHANGEME
2627
stage: ${self:custom.stage}
2728
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+
2838
documentation:
2939
info:
3040
title: CHANGEME
3141
description: CHANGEME
3242
version: 1.0.0
3343
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
3949

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
4555

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
5565

5666
functions:
5767
CHANGEME:
5868
handler: dist/events/CHANGEME.handler
5969
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
8393

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

Comments
 (0)