Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Quickly start your next serverless api project.

TypeScript AWS Lambda Google Cloud Functions Azure Functions

Delivering a single developer experience between multiple cloud providers.

const API_VERSION = '1.0.0';

const api = new Api({
    base: '/api',
});

api.get('/version', (req: RequestInterface, res: ResponseInterface) => {
    req.status(HttpStatusCode.OK).json({
        version: API_VERSION,
    });
});

// AWS-Lambda
export const handler = api.handle((event: APIGatewayProxyEvent) => await api.run());

// Google Cloud Functions
export const handler = api.handle((req: Request) => await api.run());