"Compiling" a Meteor App


I tried to “compile” a MeteorJS app by bundling it with demeteorizer (which calls the ‘meteor build’ command) and then running enclosejs to compile it to native code.

But this doesn’t work as expected. When I’m trying to compile the
demeteorized package, errors occure due to the fact that only directly
accessed scripts can be packed.

    warning  Cannot resolve 'fullPath'
    Use a string literal as argument for 'require', or leave it
    as is and specify the resolved file name in 'scripts' option.

That means, that enclosejs can only add dependencies to the compiled
application which are directly accessed (this is also mentioned in the
docs). A method which calls require() based on a variable doesn’t work.
But the bundled Meteor package only works like that (Npm.depends()).

Is there any other way to “compile” a MeteorJS application to prevent the source-code being accessible?

Thank you in advance!

1 Like

Maybe you’re addressing the problem the wrong way. Meteor makes it easy for you to call server-side code uisng Methods. Whatever trade secrets you want to hide should belong on the server side, which is code clients can’t see. Am I missing something?

The problem is that I’m creating an application that my customers install on their server, so the source code should not be accessable.

In my opinion, this scenario is better addressed via appropriate licensing agreements.

1 Like

Is there anything like this for linux?

In that case, why not put proprietary code in a C/C++ library that you deliver in a binary form? Assuming you can dictate that the server run on x86 Linux…