Last active
January 7, 2018 23:18
-
-
Save pavelvlasov/d3f980dd017dd07b5beb3be9c899439d to your computer and use it in GitHub Desktop.
Serverless.js inheritance example
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
'use strict'; | |
module.exports = { | |
provider: { | |
name: 'aws', | |
runtime: 'nodejs6.10', | |
stage: '${opt:stage, "dev"}', | |
region: '${opt:region, "us-east-1"}', | |
memorySize: 128, | |
timeout: 10, | |
deploymentBucket: { | |
name: 'sls-js-config' | |
} | |
} | |
}; |
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
'use strict'; | |
const merge = require('lodash/merge'); | |
const baseConfig = require('./base-serverless'); | |
module.exports = merge({}, baseConfig, { | |
service: 'sls-js-base-config', | |
functions: { | |
hello: { | |
handler: 'index.hello', | |
events: [ | |
{ | |
http: { | |
path: 'hello', | |
method: 'get' | |
} | |
} | |
] | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment