![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
restyped-api-gateway-lambda-proxy-async
Advanced tools
API Gateway Lambda Proxy route wrappers for declaring type-safe APIs with [RESTyped](https://github.com/rawrmaan/restyped). Also supports `async` route functions.
API Gateway Lambda Proxy route wrappers for declaring type-safe APIs with RESTyped. Also supports async
route functions.
Probably not ready to use yet.
npm install restyped-api-gateway-lambda-proxy-async
It's just like normal express, except you'll need to provide a RESTyped API definition file for the API you want to use, and return a Promise with your response value in order to activate type-checking.
import { APIGatewayEvent, APIGatewayEventRequestContext, ProxyCallback } from '@types/aws-lambda'
import RestypedRouter from 'restyped-api-gateway-lambda-proxy-async'
import {MyAPI} from './MyAPI' // <- Your API's RESTyped definition
// Lambda function body.
export function(
event: APIGatewayEvent,
context: APIGatewayEventRequestContext,
callback: ProxyCallback) {
const router = RestypedRouter<MyAPI>(event, context, callback);
// You'll get a compile error if you declare a route that doesn't exist in your API definition.
router.post('/posts', async (req, res) => {
// Error if you try to access body properties that don't exist in your API definition.
const {title, author, body} = req.body
// ^ string ^ string ^ number
const postId = await Post.create(title, author, body)
// Error if you don't return the response type defined in your API definition.
return res({
body: postId
});
}
You can throw
from inside your async
function and your thrown error will be passed to next(err)
.
Use express directly to send responses with status codes. Don't forget to return
after you res.send()
.
router.get('/posts/{id}', async (req, res) => {
const {id} = req.params
const post = await Post.get(id)
if (!post) {
return res({
statusCode: 404
})
}
return res({
body: Post
})
})
FAQs
API Gateway Lambda Proxy route wrappers for declaring type-safe APIs with [RESTyped](https://github.com/rawrmaan/restyped). Also supports `async` route functions.
The npm package restyped-api-gateway-lambda-proxy-async receives a total of 20 weekly downloads. As such, restyped-api-gateway-lambda-proxy-async popularity was classified as not popular.
We found that restyped-api-gateway-lambda-proxy-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.