0

I have looked for an answer to this question and the closest to a response that I have found is here: NodeJS on IOS/Android

The question is: Will a node.js server run on (localhost) on either/both iOS and/or Android devices. The reason for a server on these devices is below.

We currently have a server (c++) that was built to present courses in a browser, but does all of the course logic on the server. The server decides what page to display next, what question to display next in assessments, scores assessments and posttests, etc. We now want to be able have someone take our courses on their iOS/Android devices, but also to be able to take the courses offline. That means having a small version of the server with logic on the device.

Please let me know if this possible with node.js or any of it's forks. Also, could it be coded on a Windows desktop and then run on the device. Sorry, I'm very new to this.

Thanks very much for any answers/suggestions.

Dana

Community
  • 1
  • 1
danabaillie
  • 75
  • 2
  • 5
  • The server is written in C++, and you want to know if you can run a node server on Android and iOS? So you're planning to rewrite the server and hoping to just do it once, is that it? From that other question it sounds like it's possible, but it might be better to code the app in Cordova or Ionic. – nasch May 12 '15 at 01:36
  • If you just want the user to take test on the device, why do you need a server running? Just build an app with the required logic. All your course logic will be coded as an app instead of a server. – nishantkyal May 12 '15 at 05:32
  • Yes, we only want one server code. We want it to run as a regular server available to the world, and to use the same code to run as a server on both Android and iOS. We hope to put the actual course tracking code into a dll, so that it can be used by the server without giving the world access to view the code (as in javascript). We have the app almost complete and it communicates with our existing servers. We figured that if we had the server also running on the device, when there is no internet access, the app would just switch to accessing the local server. – danabaillie May 12 '15 at 15:42
  • Now, having said the above, the comment from nishantkyal makes good sense. If no internet is available, the app can handle the intelligence itself. The question I have, and I can probably get the answer from our app developer, is: will the javascript code in the app itself, be hidden from the world. I know that javascript within the browser is viewable by anyone. Are the javascript files within the app, not available within the browser, available to prying eyes on the hard drive, or are the app files hidden/encrypted/etc? Interesting idea, though. – danabaillie May 12 '15 at 15:50

0 Answers0