在Android上运行Node.Js [英] Running Node.Js on Android
问题描述
所以我知道这已经被很多问题。例如在这些问题中:
So I know this has been questioned quite a lot. To be exact for example in these questions:
- Run NodeJs server in Android
- How to run my node.js project on android?
and - NodeJS on IOS/Android
提出的每个选项都有问题:
Every option presented has a problem though:
I want to run it on my normal device so I would like to avoid installing another OS on my Device
工作于JXCore上个月停止运作(也许作为结果) )我无法编译(请参阅无法安装jxcore-cordova )
Work on JXCore was stopped last month and (maybe as a result) I couldn't get it to compile (see Can't install jxcore-cordova)
自从这些问题发布后,作为最佳选项,JXCore似乎现在无法使用的时间:
是否有一种方法来运行node.js应用程序(我的服务器
With the time that past since these questions have been posted and as the "best option" JXCore seem to be now unusable:
Is there a way to run a node.js application (a server in my case) on an Android device?
如果你想知道为什么我想要这个:我做了一个WebApp与Node.Js服务器,我现在想要一个版本您可以从手机在本地启动,无需连接到互联网。这意味着服务器需要在Android手机上运行。
if you're wondering why I'd want this: I made a WebApp with a Node.Js server and I now want a version you can launch locally from your phone without requiring an Internet connection. This means the server needs to run on an Android phone.
推荐答案
如何构建NodeJS for Android的教程 https://github.com/dna2github/dna2oslab/tree/master/android/build
有几个版本v0.12,v4,v6,v7
the tutorial of how to build NodeJS for Android https://github.com/dna2github/dna2oslab/tree/master/android/build
there are several versions v0.12, v4, v6, v7
可以在Android上运行编译的二进制文件;例如运行编译的Nginx: https://github.com/dna2github/dna2mtgol/tree/ master / fileShare
It is esay to run compiled binary on Android; for example run compiled Nginx: https://github.com/dna2github/dna2mtgol/tree/master/fileShare
只需要修改代码即可将Nginx替换为NodeJS;最好是使用Android Service在后端运行节点js服务器。
just need to modify code to replace Nginx to NodeJS; it is better if using Android Service to run node js server on the backend.
这篇关于在Android上运行Node.Js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!