是否可以将本地Web服务器嵌入到phonegap项目中? [英] Is it possible to embed a local web server into phonegap project?
本文介绍了是否可以将本地Web服务器嵌入到phonegap项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要构建一个离线Phonegap应用.但是,我所有的js函数都需要Web服务器才能正常运行. 是否可以将本地Web服务器嵌入phpnegap项目?
I need to build an offline Phonegap app. However, all of my js functions need a web server to run well. Is it possible to embed a local web server into phpnegap project?
推荐答案
是的,可以使用Cordova HTTPD插件:
Yes, it's possible using a Cordova HTTPD plugin:
https://github.com/floatinghotpot/cordova-httpd
我还没有使用过,但是我可能需要使用当前的项目.
I haven't used it yet, but I may need to with my current project.
一个缺点是,如果知道IP地址,则其他人将能够浏览托管的文件.在部署之前,我将更改这种行为.
One drawback is that if the IP address is known, others will be able to browse the hosted files. Before I deploy, I'll be changing that behavior.
这篇关于是否可以将本地Web服务器嵌入到phonegap项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文