danabaillie
danabaillie

Reputation: 75

Node.js Server Running on iOS/Android

I have found plenty of questions/aswers about using node.js to build a server and how the javascript (server side) code won't be accessible to people accessing the server via a browser as it is not client side javascript.

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

If what I fear above is true, is there any way keep prying eyes away from the server side javascript on these devices?

Thanks very much for your help.

Dana

Upvotes: 4

Views: 8299

Answers (2)

Manohar Reddy Poreddy
Manohar Reddy Poreddy

Reputation: 27393

As of today, it looks possible (yr 2015).

Check below site, which went open source recently:
http://jxcore.io/

Upvotes: 2

jfriend00
jfriend00

Reputation: 707248

You cannot hide node.js javascript files from access on the actual server device. Those files have to be readable to the node interpreter which means they are readable to anyone else. This is basically the same issue as Javascript files used in a browser. The files are visible on the computer in which they are running. Javascript is not a compiled language so the source code is visible.

You could, of course, obscure them (minimize), but that isn't a form of security, just makes it a little more work for someone to see what your code does.

Upvotes: 1

Related Questions