node js-如何创建用于商业用途的构建? [英] node js - How do I create build for commercial usage?

查看:75
本文介绍了node js-如何创建用于商业用途的构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发node js应用程序,现在可以使用了.我想将此应用程序制作为exe,以便可以将其用于商业用途.

I am working on node js application and it is now ready to use. I want to make exe of this application so that it can be used for commercial usage.

到目前为止,我使用了 enclose 模块,通过该模块我编译了应用程序代码,但是发现了一些问题(应用程序在空闲状态下崩溃).应用程序运行良好,没有封装或编译的代码.

Up to now I have used enclose module using which I have compiled the code of application but I have found some issues in that (app got crash on idle condition). App is running good without enclose or compiled code.

我在Google上进行了搜索,发现了一些替代模块,例如JXcore,Node webkit和Electron等.但是JX Core给出的错误与

I have searched on google and found some alternate modules like JXcore, Node webkit and Electron etc. but JX core giving error same as in SO question.

node web-kit 中,它的功能看起来不合适,因为我们需要它的可执行文件和一些dll以及我们的代码,这使我们的程序包体积很大.

In node web-kit, it's functionality is not looking suitable as we need its executable and some dll's along with our code, which makes our package bulky.

我也尝试过 jxcore . exe和我们使用的模块的主要问题是它们与本机模块(在我的情况下为Kinect.node模块)一起使用的能力.该模块无法编译.我们需要一种变通方法来仅将其与我们的.exe文件打包在一起. Enclose在其内置功能中提供了此解决方法.

I have also tried jxcore. The main problem with the exe's and with modules that we use is their ability to work with native modules, in my case the Kinect.node module. This module cannot be compiled. We need a workaround to package only this along with our .exe file. Enclose provides this workaround in its inbuilt functionality.

还要查看 EncloseJS 的回复,该回复实际上是由一个人运行的,该人在购买时会提供进一步的说明.商业用途需要购买.

Also looking a response from EncloseJS, which is actually run by just one person who gives further instructions upon purchase. A purchase is needed for commercial usage.

对于电子,它仅支持Electron-based application source code.因此,如果选择此选项,则必须修改我的应用程序代码.

In case of Electron, It is supporting only Electron-based application source code. So If I choose this then I have to modify my application code.

那么任何人都可以建议我如何从那里的节点js代码制作exe文件吗?

So can any one suggest me what can I do to make exe file from node js code there?

谢谢!

推荐答案

我已经回答了:

首先,原因是DiskDB数据库,它与节点Webkit不兼容,所以这就是为什么我遇到本机模块错误的原因.

First, reason was DiskDB database, it was not compatible with the node webkit so that is why I was getting error of native modules.

现在,我正在为本地数据库使用 sqlite3 模块.比DiskDB好.

Now I am using sqlite3 module for local database. It is better than DiskDB.

第二,原因之一是免费版的Enclose,付费版的Enclose JS模块忽略了我遇到的超时问题.

Second, One reason was free version of enclose, Paid version of Enclose JS module ignores the timeout issue which I was getting.

这样,我已经解决了我的问题.

This way I have resolved my question.

这篇关于node js-如何创建用于商业用途的构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆