vertx-examples icon indicating copy to clipboard operation
vertx-examples copied to clipboard

using AMD in verticle on the server.

Open dlaberge opened this issue 11 years ago • 2 comments

Could javascript verticle have support for AMD. That would allow to use requirejs in verticle. Hence allow parts of the controller from the client side to be used in the verticle.

dlaberge avatar Oct 07 '15 18:10 dlaberge

AMD is only supported on the client (using the vertx-eventbus.js). On server only commonJS is supported.

cescoffier avatar Oct 08 '15 06:10 cescoffier

Although - it might not be too tricky to implement this.

There's a requireJS implementation for Node.js, which I believe is written in JavaScript.

So, I'm guessing that could be ported to Vert.x - i.e. remove the Node.js specific parts and replace with Vert.x

I'm not sure how feasible this is, but maybe something to look at. But in any case this issue is posted on the wrong project. It should be on vertx-lang-js.

purplefox avatar Oct 08 '15 06:10 purplefox