carbonrobot / hapi-lambda Goto Github PK
View Code? Open in Web Editor NEWDeploy Hapi.js API's on Amazon Lambda
License: MIT License
Deploy Hapi.js API's on Amazon Lambda
License: MIT License
Hello!
I think this was added to AWS after this project was released, but in order to support array response (like how Hapi natively responds to set-cookie
), you need to move the set-cookie
(or other array values headers for that matter) from headers
to multiValueHeaders
.
Let me know if you'd like a PR for this!
Hi,
I am using Hapi with route and view for website. I have template and layout.
I found that:
const response = { statusCode: res.statusCode, headers: res.headers, body: typeof res.result === 'string' ? res.result : JSON.stringify(res.result) };
The body display wrong value of html, return encoded code. If I set html value, it display ok, so I think res.result is not correct or it may be encoded.
You can see the web page display here:
https://drive.google.com/open?id=10QYlq3q6Gc3yjXE4c3K1ezKm5-oHGG9u
Please help me to explain if I have wrong setup.
Thanks.
Line 8 in 0c97fbe
I'm a hapi n00b, but it appears the .connection() method isn't valid anymore.
I have upload images to a Hapi 17 route as form data and its always worked fine. I recently migrated the server code to serverless using hapi-lambda and everything has been working fine EXCEPT for file uploads.
If I output the formData.image[data] I get a different result from the output of the Hapi 17 server vs the output of the hapi-lambda server for the same file upload.
The "sharp" image processing has always worked with the Hapi 17 upload, but it fails with hapi-lambda, saying "Input buffer contains unsupported image format.
Does something additional need to be added to the transformRequest or transformResponse ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.