Description
I want to see Claudia act as a express wrapper. The example doesn't work. Below are the files:
lambda.js
'use strict'
const awsServerlessExpress = require('aws-serverless-express')
const app = require('./app')
const binaryMimeTypes = [
'application/octet-stream',
'font/eot',
'font/opentype',
'font/otf',
'image/jpeg',
'image/png',
'image/svg+xml'
]
const server = awsServerlessExpress.createServer(app, null, binaryMimeTypes);
exports.handler = (event, context) => awsServerlessExpress.proxy(server, event, context)
app.js
'use strict'
const express = require('express')
const app = express()
app.get('/', (req, res) => res.send('Hello World!')); // I simplified this line
// app.listen(3000) // <-- comment this line out from your app
module.exports = app // export your app so aws-serverless-express can use it
-
Expected behaviour:
Hello World -
What actually happens:
Cannot GET /claudia-test -
Link to a minimal, executable project that demonstrates the problem:
https://s3.amazonaws.com/aws-lambda-and-heroku-po-serverlessdeploymentbuck-1d0yrknidc0v1/serverless/Lambda-Deployment.zip -
Steps to install the project:
Follow the steps in the instructions -
Steps to reproduce the problem:
Run the generated lambda.