mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Switch express-serve-static-core to a module * Add tsconfig to aws-serverless-express * Switch aws-serverless-express to module * Fix dangling pointer * Fix wrong file name * Add tsconfig.json * switch seamless-immutable a module * Add tsconfig.json * use --strictNullChecks
29 lines
728 B
TypeScript
29 lines
728 B
TypeScript
/// <reference types="express"/>
|
|
|
|
import * as awsServerlessExpress from 'aws-serverless-express';
|
|
import * as express from 'express';
|
|
|
|
const app = express();
|
|
const server = awsServerlessExpress.createServer(app, () => {});
|
|
|
|
const mockEvent = {
|
|
key: 'value'
|
|
};
|
|
|
|
const mockContext = {
|
|
callbackWaitsForEmptyEventLoop: true,
|
|
functionName: 'testFunction',
|
|
functionVersion: '1',
|
|
invokedFunctionArn: 'arn',
|
|
memoryLimitInMB: 128,
|
|
awsRequestId: 'id',
|
|
logGroupName: 'group',
|
|
logStreamName: 'stream',
|
|
getRemainingTimeInMillis: () => 2000,
|
|
done: () => false,
|
|
fail: (error: any) => false,
|
|
succeed: (message: string) => false
|
|
};
|
|
|
|
awsServerlessExpress.proxy(server, mockEvent, mockContext);
|