-
Notifications
You must be signed in to change notification settings - Fork 299
Conversation
case 1: callback(null, apiClients.b); c++; break | ||
case 2: callback(null, apiClients.c); c++; break | ||
default: callback(new Error('no more nodes available')) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 'hacky' right now.
What I would love to be able to do is to have a an actual spawnNode function, that new if run on the browser or in Node.js and would spawn the node through a Karma service. Essentially, RMI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dignifiedquire does karma offer a way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not without writing a decent amount of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you could do is
- create a simple socket.io server that can spawn nodes on a specific message (start this one through gulp)
- in the spawn function, connect to the socket.io server and tell it to spawn a node, and get as a response the needed info, this spawn function would then work in the browser and in node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
It would be a sweet feature for Karma btw :)
5021223
to
61fd705
Compare
@diasdavid PRs welcome :) |
…d clean up the tests folder to make the organization more obvious
61fd705
to
e40f7d5
Compare
RFM, needs CR |
The CI errors are #339 |
} | ||
|
||
module.exports = (callback) => { | ||
const http = new Hapi.Server(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to bring in hapi? just using core-http should be enough for serving socket.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like hapi
because then I can just set CORS to true without having to write headers by hand. Also hapi
is pretty modular, a lot of features (like template engine) are buy in modules, which makes it a 'smaller' framework
Thank you for CR @dignifiedquire :) merging |
No description provided.