Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from bryan-hunter/add-auto-create-domain
add autoDomain and autoDomainWaitFor option to config
- Loading branch information
Showing
8 changed files
with
257 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,7 @@ async function sleep(seconds) { | |
} | ||
|
||
export { | ||
sleep, | ||
getAWSPagedResults, | ||
throttledCall, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use strict"; | ||
|
||
module.exports.helloWorld = (event, context, callback) => { | ||
const response = { | ||
statusCode: 200, | ||
headers: { | ||
"Access-Control-Allow-Origin": "*", // Required for CORS support to work | ||
}, | ||
body: JSON.stringify({ | ||
message: "Go Serverless v1.0! Your function executed successfully!", | ||
input: event, | ||
}), | ||
}; | ||
|
||
callback(null, response); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# create_domain should be run as part of deployment | ||
service: auto-domain-${opt:RANDOM_STRING} | ||
provider: | ||
name: aws | ||
runtime: nodejs12.x | ||
region: us-west-2 | ||
stage: test | ||
functions: | ||
helloWorld: | ||
handler: handler.helloWorld | ||
events: | ||
- http: | ||
path: hello-world | ||
method: get | ||
cors: true | ||
plugins: | ||
- serverless-domain-manager | ||
custom: | ||
customDomain: | ||
domainName: auto-domain-${opt:RANDOM_STRING}.${env:TEST_DOMAIN} | ||
basePath: '' | ||
autoDomain: true | ||
autoDomainWaitFor: 120 | ||
|
||
package: | ||
exclude: | ||
- node_modules/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters