Collection of Serverless Composable Utilities
- π» Composable functions for common tasks
β οΈ Global Error handling- π» Strict Execution scope
- ποΈ Automatic Response Compression
- π€ Automatic Handlers Result Transform
- β¨οΈ Built with TypeScript providing TypeSafe options for all composables
import { use, useQueryParameters } from '@serverless-use/apigw'
export const handler = use(async () => {
const { queryParameters } = useQueryParameters()
const { name } = queryParameters
return {
statusCode: 200,
headers: {
'Content-Type': 'text/html',
},
body: /*html*/ `
<body style="display: grid; place-content: center;">
<h1 style="text-align:center;">Welcome ${name}!</h1>
<img src="https://i.giphy.com/media/mx9fVEF08tyne/giphy.gif">
</body>`,
}
})
npm i @serverless-use/apigw
This project is based on VueUse