at the endpoint


Hello, is it possible to deploy a mini app and use it at the endpoint in runkit? I couldn’t manage it in runkit till now (when I use the successful codes which I use on my desktop).

(The error is: “ReferenceError: io is not defined”)



Could you provide some of the code? It would help us debug your issue.




Here is a sample code:
And its endpoint is here:

When I use it on my desktop (localhost), I see an “Object { hello: “world” }” in my console (browser) and a “{ my: ‘data’ }” response to it on my node.js prompt. However, at the endpoint in runkit, I see some error messages.


Hi Clojure,

I’ve made a little progress, but the fix is somewhat complex and might take us a little bit unfortunately. If you add the following code at the top of your handler function you will get a little further;

function handler(req,res){
if (req.url === "/" ||
    req.url === "/")
    return io.serve(req, res);

This will make it so the script is at least loaded in the page, but I can’t get the connection event to fire yet (I see requests going back and forth though). Either way, perhaps this helps you get a little farther, and we’ll try a few more workarounds too to see if we can get you using this sooner than when our real fix is implemented.

So, just to conclude: this is definitely our bug, I have a vague idea of how to fix it, but it will take a little time so hopefully we can find a workaround in the meantime to get you going (or perhaps give you enough info to help you find a workaround). Really sorry for this, we definitely want to fix it!


Thank you very much for your reply. I look forward to see the bug fixed, good luck!