-
-
Save Uvacoder/1404bb85023cff42d2a080cb099c33d6 to your computer and use it in GitHub Desktop.
Serverless config with function support. https://github.com/DavidWells/configorama#usage
This file contains hidden or 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
| service: my-service | |
| custom: | |
| one: 'hello' | |
| two: 'there' | |
| together: ${merge(${custom.one}, ${custom.two})} | |
| # ^ resolves to 'hellothere' | |
| provider: | |
| name: aws | |
| runtime: nodejs8.10 | |
| functions: | |
| currentTime: | |
| handler: handler.endpoint | |
| events: | |
| - http: | |
| path: ping | |
| method: get |
This file contains hidden or 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
| /* Serverless framework reads this file */ | |
| const path = require('path') | |
| const configorama = require('configorama') | |
| const cliFlags = require('minimist')(process.argv.slice(2)) | |
| // Path to yaml/json/toml config | |
| const myConfigFilePath = path.join(__dirname, 'serverless-config.yml') | |
| // Configorama can take file paths or JS objects. | |
| const serverlessConfig = configorama.sync(myConfigFilePath, { | |
| options: cliFlags | |
| }) | |
| module.exports = serverlessConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment