I want to create JavaScript exe file. On clicking of exe file, It should open my reactJS web application in web browser. From JS exe file, I have to pass query param to Web application. Please help me with code.
I want to create JavaScript exe file. On clicking of exe file, It should open my reactJS web application in web browser. From JS exe file, I have to pass query param to Web application. Please help me with code.
Share Improve this question asked Nov 9, 2016 at 5:53 LivinthaLivintha 711 gold badge1 silver badge3 bronze badges 2- You do understand how Web applications work, do you? – Rax Weber Commented Nov 9, 2016 at 5:56
- you can package it as an Electron app. – nicholaswmin Commented Nov 9, 2016 at 5:57
4 Answers
Reset to default 3You can create a shell script to launch the browser with a link to your web application that is on your local machine. You haven't given much details, but in general it's pretty easy.
cat > launch.exe
#!/bin/bash
$BROWSER http://localhost
chmod +x launch.exe
./launch.exe
If this is to be piled and run on Windows installations only then here's your answer: https://msdn.microsoft./en-us/library/7435xtz6(v=vs.100).aspx
Java code is different from JavaScript. They might both be Object Oriented Programming (OOP), but JavaScript is specifically a scripting language. Its impossible to make a .exe file out of JavaScript.
You should try jsc.exe (under Windows only), NWJS or Electron.
The latest two are surely your best pick.
Edit: I would add NeutralinoJs to my previous suggestion. It's nice, simple and useful.