Closed eneroth closed 7 years ago
Hi Henrik - I don't know I'm afraid! I've not really ever used Node, either through JS or compiled CLJS, sorry! Could take a look into what Node has in the way of an API we could wrap - do you know of anything?
heads to Google
Cheers,
James
Well, I don't imagine it would be that much work if socket.io was used, for example. This is how you set up a listener with socket.io:
io.on('connection', function (socket) {
socket.emit('news', { hello: 'world' });
socket.on('my other event', function (data) {
console.log(data);
});
});
In fact, since chord doesn't support Node, I'll probably just write a core.async wrapper around that :-) Of course, in supporting Transit and so on, it gets a little bit more complicated, but most of that code should already be present in your client code.
Fixed by #54, in the 0.8.1 release - thanks @ageneau!
Would it be possible to use Node.js as server somehow? Or is my best bet to use something Node-native, like Socket.io?