Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to create an shortcut desktop to a Node.js (npm) application?

Inexperienced users want to "see" the app that I've created in Node.js, but they don't want to use the console. According to them, it's a good idea to install it, and with a simple click, in desktop, they could "see" it.

They want to run the Node.js app as a Windows program. That's all!

How can I do it? Should I create a batch file?

like image 939
Ulises Vargas De Sousa Avatar asked Sep 15 '16 13:09

Ulises Vargas De Sousa


3 Answers

**SOLVED**

An .bat file, renamed as "appstart.bat"

cd C:\Users\MyUser\MyApp
npm start

With shortcut in desktop.

like image 96
Ulises Vargas De Sousa Avatar answered Oct 08 '22 12:10

Ulises Vargas De Sousa


You can also create a shortcut and set "Target" to...

C:\Windows\System32\cmd.exe /k "node index.js"

... and set "Start In" to the directory index.js is in.

like image 3
PAEz Avatar answered Oct 08 '22 13:10

PAEz


Because Node-Red is usually installed globally _

a Node-Red.bat file could simply be

cd \
Node-Red

then use convertico.com to change the Node-Red.png file to Node-Red.ico.

Slick Willy

like image 2
Bill Brutzman Avatar answered Oct 08 '22 13:10

Bill Brutzman