Node.js Server running on iOS / Android

I found a lot of questions / discussions about using node.js to create a server and how javascript (server side) code will not be available to people accessing the server through a browser as it is not JavaScript client side.

If I want to use this server on an iOS or Android device (actually running the server on the device) am I wrong in assuming that server side javascript will now be available to everyone using this device? I don't believe node.js compiles or otherwise hides javascript on the server side.

If what I'm afraid above is true, is there any way to keep prying eyes from server side javascript on these devices?

Many thanks for your help.

Dana

+4


source to share


3 answers


You cannot hide the node.js javascript files from accessing the real server device. These files must be readable by the node interpreter, which means they are readable by other users. This is basically the same problem as the Javascript files used in the browser. The files are visible on the computer on which they are run. Javascript is not a compiled language, so the source code is visible.



You could, of course, hide them (minimize), but this is not a form of security, it just makes it a bit of work for someone to see what your code is doing.

+1


source


Today it looks possible (since 2015).



Check out the site below which has recently opened as open source:
http://jxcore.io/

+2


source


You can run Node on iOS and Android with LiquidCore .

LiquidCore allows you to run Node.js virtual machines inside Android and iOS apps. It provides a complete runtime environment including a virtual file system and native MySQL support.

LiquidCore is a full port of Node 8. 9+ and supports all bells and whistles. On iOS, its magic comes from a translation layer called V82JSC

which does exactly what it sounds like. V8 calls are translated at runtime into native Apple JavaScript, which allows the node to compile with virtually no code in the node changed. This allows for faster and faster porting to newer versions of the node and with fewer errors.

0


source







All Articles