简体   繁体   English

node.js的jxcore包在浏览器中无法运行该应用程序

[英]does jxcore package for node.js lauch the app in browser

i have created windows application using jxcore and mean stack. 我已经使用jxcore和均值堆栈创建了Windows应用程序。 The executable file works fine and pages are also getting displayed properly. 可执行文件可以正常工作,并且页面也可以正确显示。 The problem is everytime i have to go to browser and open the localhost:2000 to launch the app. 问题是每次我必须去浏览器并打开localhost:2000来启动应用程序时。 jxcore package runs only the node server but not the browser. jxcore软件包仅运行节点服务器,而不运行浏览器。 Is this the nature of jxcore or i have missed something while creating jxcore executable. 这是jxcore的本质,还是我在创建jxcore可执行文件时错过了一些东西。

yes, it is the nature of jxcore, in the same way as node.js. 是的,这是jxcore的本质,与node.js相同。 one of the simplest way is using node-open: https://www.npmjs.com/package/open . 最简单的方法之一是使用node-open: https : //www.npmjs.com/package/open

you can also try project previously known as "node-webkit" ( http://nwjs.io/ ), that allows creating browser together with node code. 您还可以尝试以前称为“ node-webkit”( http://nwjs.io/ )的项目,该项目允许与节点代码一起创建浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM