Skip to content

Instantly share code, notes, and snippets.

@fernyettheplant
Created April 14, 2018 21:49
Show Gist options
  • Save fernyettheplant/f94081f8339711f4219ce57bc786f335 to your computer and use it in GitHub Desktop.
Save fernyettheplant/f94081f8339711f4219ce57bc786f335 to your computer and use it in GitHub Desktop.
'use strict';
const awsServerlessExpress = require('aws-serverless-express')
const app = require('./server')
const binaryMimeTypes = [
'application/javascript',
'application/json',
'application/octet-stream',
'application/xml',
'font/eot',
'font/opentype',
'font/otf',
'image/jpeg',
'image/png',
'image/svg+xml',
'text/comma-separated-values',
'text/css',
'text/html',
'text/javascript',
'text/plain',
'text/text',
'text/xml'
]
const server = awsServerlessExpress.createServer(app, null, binaryMimeTypes)
module.exports.nuxt = (event, context) => awsServerlessExpress.proxy(server, event, context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment