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.
4 Answers
You 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
7 Comments
.exe extension. He can make it executable easily. The first line would indicate the interpreter to use.If this is to be compiled and run on Windows installations only then here's your answer: https://msdn.microsoft.com/en-us/library/7435xtz6(v=vs.100).aspx
Comments
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.
1 Comment
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.