Skip to content
Fouquet François edited this page Aug 9, 2013 · 3 revisions

Use KMF generated models into NodeJS ?

The KMF maven plugin generates into the target directory a file named : .min.js. This file is ready to be included as a nodeJS module.

To load it, you only have to call the include directive of nodeJS:

var model = require('./org.kevoree.modeling.sample.cloud.js.min.js');

And use all KMF generated classes as follows:

var saver = new model.org.cloud.serializer.JSONModelSerializer();

Please find a running example (the same model as the playground) at the following address:

https://github.com/dukeboard/kevoree-modeling-framework/tree/master/metamodel/cloud/nodejs