Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Serverless.ts complex project imports
export { default as hello } from './hello';
export { default as goodbye } from './goodbye';
// 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'
}
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