本文介绍了是否有用于节点应用程序的独立gui模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在nodejs中构建代码编辑器.有一些选项,例如使用Express Server显示编辑器并在后端执行代码.但这将需要浏览器.因此,我正在寻找可以为Windows平台提供独立GUI的节点模块.

I want to build a code editor in nodejs. There is option like using an express server to show editor and to execute code in backend. But that would require a browser. So I am looking for node modules that can provide standalone gui for windows platform.

推荐答案

有两种不同的选择,具体取决于您要如何进行.

There are a couple of different options, depending on how you want to proceed.

选项1:

使用QT或GTK绑定之类的东西来制作更传统的GUI应用程序.这些选项通常只是Node绑定到GTK和QT公开的C/C ++ API.参见 node-qt .尽管这些似乎没有得到积极开发.

Use something like QT or GTK bindings to make a more traditional GUI application. These options generally are just Node bindings to the C/C++ API that GTK and QT expose. See node-qt and yue. Although these seem to not be actively developed.

更新:

您可以看一下NodeGUI: https://github.com/nodegui/nodegui

You can take a look at NodeGUI: https://github.com/nodegui/nodegui

NodeGUI是一个JavaScript库,用于使用JavaScript和CSS等样式来构建跨平台的本机桌面应用程序.它在后台使用Qt,并且可以在Mac,Linux和Windows上运行.

NodeGUI is a javascript library for building cross-platform native desktop applications with JavaScript and CSS like styling. It uses Qt under the hood and works on Mac, Linux and Windows.

它还有一个基于React的渲染器,称为React NodeGUI,类似于React Native,但用于桌面: https://github.com/nodegui/react-nodegui

It also has a react based renderer called React NodeGUI which is like React Native but for desktop: https://github.com/nodegui/react-nodegui

选项2:

使用一个采用HTML,CSS和Javascript并将其捆绑到独立HTML5应用程序中的框架.有很多框架作品可以做到这一点.示例包括 node-webkit AppJS 等.

Use a framework that takes HTML, CSS, and Javascript and bundles it into a standalone HTML5 app. There are a bunch of frame works out there that do this. Examples include node-webkit and AppJS among many others.

这篇关于是否有用于节点应用程序的独立gui模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-02 05:41