centos - 开发的electron软件 运行在linux平台的解决方案
某草草
某草草 2017-04-26 09:01:57
0
2
912

我的软件用electron 开发的。

可以运行在linux没问题。但是要想运行在无图形界面的linux平台。是不是得开发各种命令。
比如 service nginx restart 就是让软件启动。还有停止什么的
比如
electron -v
就是列出软件的版本号。

弱弱的问,在electron里面怎么弄这些功能,好无头绪啊,百度搜索都不知道搜索什么关键词。请指点一二,谢谢。

某草草
某草草

reply all(2)
刘奇

electron is used to build desktop applications.

If you want to run it under the console of linux, don’t use linuxconsole下跑起来,就不要使用electron,直接用node.js, just use node.js directly?

小葫芦

It’s okay. However, Electron is actually useless in this case, because the command line interactive output mainly relies on stdout output, not the HTML rendering result. It would be better to use Node.js directly.
process.argv is the command line parameter, the first two are the electron command and main.js.
var options = process.argv.slice(2);
You need to execute it manually instead of using npm.
node_modules/.bin/electron main.js argv1 argv2
Process commands in main.js.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!