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