Code Monkey home page Code Monkey logo

Comments (8)

dougmoscrop avatar dougmoscrop commented on August 22, 2024 1

Also since this is basically express, you can see how I have to set these headers:

https://github.com/dougmoscrop/serverless-http/blob/master/test/express.js#L53

I tried to work around the content-length being unset:

https://github.com/dougmoscrop/serverless-http/blob/master/lib/request.js#L33

It's possible this is hitting another scenario that I am missing or that something in an of these libraries has changed, or that something in APIg->Lambda changed :D

from serverless-http.

dougmoscrop avatar dougmoscrop commented on August 22, 2024

Thanks for reporting this.

The way I expect to debug this would be to create a new integration test with your code and then see what's going on with debug. If it works locally then I'd move to arduous testing inside an actual Lambda. In this case I'd just write the code as ES6 JS not TS.

I will take a look when I find some time, but one thing I've noticed is the content-type/content-length header sometimes trips up body-parser.

from serverless-http.

Firaenix avatar Firaenix commented on August 22, 2024

Thanks for getting back to me!
If there is anything I can do to help, let me know!

I'm really keen on using your library so I'd love to have this working!
πŸ‘

from serverless-http.

dougmoscrop avatar dougmoscrop commented on August 22, 2024

Could you put together a minimal, non-TS version? For example, I don't know what is in ./Injector

from serverless-http.

Firaenix avatar Firaenix commented on August 22, 2024

Sure no worries, working on it now

from serverless-http.

Firaenix avatar Firaenix commented on August 22, 2024

Here you go,
I've mocked up a very quick test server with a controller for you.
I've got a readme in there if you need it
πŸ˜„

TestInversifyServer.zip

from serverless-http.

dougmoscrop avatar dougmoscrop commented on August 22, 2024

I finally got around to peeking at this, sorry it only took over a year :)

I dunno, I wrote this test: https://github.com/dougmoscrop/serverless-http/blob/master/test/inversify.js

and it worked. I didn't obvious set up all the fancy controller/injection stuff. Can you take a look? See if I did something different?

from serverless-http.

dougmoscrop avatar dougmoscrop commented on August 22, 2024

I'm gonna close this out since there's at least a basic test, if anyone wants to PR a failing test I will take it and run with it

from serverless-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.