Code Monkey home page Code Monkey logo

Comments (3)

Marak avatar Marak commented on May 24, 2024

@mikaelkaron - This is a very good observation.

It was actually not possible to listen for these events with the current microcule architecture.

The crux of the issue is that we needed to open an additional STDIO channel 3 to handle HTTP request / response methods. Currently we are handling all response methods over STDERR which is STDIO channel 2. This has been long discussed in the hook.io repo with @pyhedgehog ( among others )

Good news, I've now opened up STDIO 3 in the pipe3 branch, and we should now be able to listen for the events you need.

Please feel free to test this branch out. It shouldn't break anything, but I should do further testing downstream to ensure it's not going to break anything. Overall, this was a much needed feature. I'm hoping to eventually migrate our overloaded STDERR channel to use the new pipe3.

from microcule.

Marak avatar Marak commented on May 24, 2024

I'm a bit confused, because this was and has previously been working on hook.io. I don't think we need pipe3 for this?

see:

https://hook.io/examples/javascript-stream-transform
https://hook.io/examples/javascript-stream-transform/source

It's still working on hook.io, so maybe it was with a recent version of microcule which hasn't been deployed or we both experienced the same testing bug.

Going to investigate further.

from microcule.

Marak avatar Marak commented on May 24, 2024

Yeah, not sure what happened here. There was a disconnect somewhere, but we do have and already had this functionality.

We do have streaming examples checked into the repo which can be tested with curl commands.

I've commented out the pipe3 code for now, but left it in-tact. We should probably use this new code path for migrating from overloading STDERR with http response methods.

from microcule.

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.