-
-
Save wenindoubt/2d04f64c447b4f37e2195a8eec6076b0 to your computer and use it in GitHub Desktop.
Serverless.ts complex project imports
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
| export { default as hello } from './hello'; | |
| export { default as goodbye } from './goodbye'; |
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
| // Lambda configuration is at the same location of the actual handler's code | |
| export default { | |
| handler:'hello.main', | |
| events: [ | |
| { httpApi: 'GET /hello'} | |
| ] | |
| } | |
| const main = () => { | |
| return 'Hello from lambda' | |
| } |
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
| import functions from './functions'; | |
| const serverlessConfiguration: Serverless = { | |
| service: 'myServerlessService', | |
| provider: { | |
| name: 'aws', | |
| runtime: 'nodejs12.x' | |
| }, | |
| functions | |
| }; | |
| module.exports = serverlessConfiguration; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment