-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlambda.ts
More file actions
25 lines (23 loc) · 691 Bytes
/
Copy pathlambda.ts
File metadata and controls
25 lines (23 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import app from './server.lambda';
const awsServerlessExpress: any = require('aws-serverless-express');
const binaryMimeTypes = [
'application/javascript',
'application/json',
'application/octet-stream',
'application/xml',
'image/jpeg',
'image/png',
'image/gif',
'text/comma-separated-values',
'text/css',
'text/html',
'text/javascript',
'text/plain',
'text/text',
'text/xml',
'image/x-icon',
'image/svg+xml',
'application/x-font-ttf'
];
const server = awsServerlessExpress.createServer(app, null, binaryMimeTypes);
export const handler = (event: any, context: any) => awsServerlessExpress.proxy(server, event, context);