Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ispyinternet/18aaa337ba044668c9dcf160cf6f6eb6 to your computer and use it in GitHub Desktop.
Save ispyinternet/18aaa337ba044668c9dcf160cf6f6eb6 to your computer and use it in GitHub Desktop.
sapper / aws-serverless-express
'use strict'
process.env.SAPPER_DEST = __dirname + "/__sapper__/build";
import app from './__sapper__/build/server/server.js';
import awsServerlessExpress from 'aws-serverless-express';
exports.handler = (event, context) => {
console.log(event);
const server = awsServerlessExpress.createServer(app, null, ['*/*'])
awsServerlessExpress.proxy(server, event, context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment