Comments (7)
@mphuie - I think I got it. This makes sense. I must have forgotten to update the examples to use the new API semantics.
If you look at https://github.com/Stackvana/microcule/blob/master/examples/express-python.js#L19, you'll see it's now updated and should be working.
Basically, if the response isn't closed inside of a script, we need to have a middleware at the end of the server to catch and close the response. This will only fire if the script itself doesn't close the response.
I'll take the time to update the other examples and see about adding documentation for explicitly closing the request inside non-JS services.
Does that work for you?
from microcule.
This is on OS X 10.12.4 with Node v6.9.5
from microcule.
Can you be more specific which example you are having issues with?
There should be a mechanism in place which ends the request when the script completes. It's possible I failed to port over this functionality from hook.io, but I know we did create a way for this to work.
from microcule.
Tried these. Only the JS example in express-multi-language.js
works
https://github.com/Stackvana/microcule/blob/master/examples/express-multi-language.js
https://github.com/Stackvana/microcule/blob/master/examples/express-python.js
https://github.com/Stackvana/microcule/blob/master/examples/express-any-binary.js
from microcule.
I think I got it, one moment.
from microcule.
Yep, that works, doesn't that mean the server will return a 200 regardless of exit code?
from microcule.
I think right now, it's up to the developer to determine which HTTP status will be sent back into the response. It would probably be correct for us to provide a configurable mapping of HTTP response codes to the exit codes. I believe hook.io is doing this already to some extent.
If you could post some example code or scenarios with what you would expect to see as a result, I would be glad to review and see if we can incorporate it into the project.
Thank you for your feedback.
from microcule.
Related Issues (20)
- Implement associative arrays for bash services HOT 1
- Ensure that lua variable names and values are escaped
- Update node.js function signature HOT 1
- Can't require local files HOT 3
- Detecting client abort inside hook HOT 3
- Refactor `spawn` plugin into separate module
- Switch `coffee-script` and `babel` to new compiled languages plugin
- Improve bash escape code HOT 1
- Implement JSON support for `golang` and `rust`
- microcule + x-ray + docker streaming error HOT 5
- DeprecationWarnings are written out on the console HOT 3
- Support https connections HOT 2
- spawn EACCESS
- Populate $_GET and $_POST scope for PHP services
- Add support for .Net Core HOT 2
- Discrepancy in Github and npm installation HOT 3
- How to support logging (console.log) statement in microcule example java script index.js file? HOT 6
- Support websocket connections HOT 2
- Test failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microcule.