Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

express-app-lambda doesn't work - Cannot GET /claudia-test #32

Open
daviddbal opened this issue Feb 25, 2019 · 0 comments
Open

express-app-lambda doesn't work - Cannot GET /claudia-test #32

daviddbal opened this issue Feb 25, 2019 · 0 comments

Comments

@daviddbal
Copy link

daviddbal commented Feb 25, 2019

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant