将node.js webapp打包为普通桌面应用程序 [英] Packaging a node.js webapp as a normal desktop app
问题描述
我搜索了一下但是找不到现有的工具。
I've searched a bit but can't find an existing tool for this.
我有一个node.js网络服务器,可以在你的网站上运行自己的电脑,为你做一些时髦的事情。如果我可以双击 MySnazzyThing.app
而不是安装nodejs,npm并运行节点mysnazzyapp.js $ c $,这将是非常令人讨厌的c>在命令行上。
I have a node.js web server that is designed to run on your own computer that does some snazzy things for you. It would be pretty aswesome if I could double click MySnazzyThing.app
instead of installing nodejs, and npm and running node mysnazzyapp.js
on the command line.
.app
可执行文件将清空节点服务器并打开一个简单的本机webkit窗口,如果我在命令行上运行,它将显示通常在 localhost:3000
上的内容。
The .app
executable would spool up the node server and open a simple native webkit window which would show what would normally be on localhost:3000
if I were running on the command line.
然后,这个本机应用程序可以通过mac app store分发。和bam,一个node.js桌面应用程序。
This native app could then, say, be distributed through the mac app store. And bam, a node.js desktop app.
是否存在任何此类工具?或者有任何技术原因,这不会像我想象的那样有效吗?
Does any such tool exist? Or are there any technical reasons that this wouldn't work as I imagine it?
推荐答案
您可以使用AppJS完成此任务:< a href =https://github.com/appjs/appjs =noreferrer> https://github.com/appjs/appjs
You can accomplish this using AppJS: https://github.com/appjs/appjs
这篇关于将node.js webapp打包为普通桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!