question

mukilanmws-8067 avatar image
0 Votes"
mukilanmws-8067 asked PengGe-MSFT commented

Basic Node js express 4 build webapplication to exe issues

Hi Guys,
I am a newcomer to Visual Studio. I know only Nodejs. So, I try to create an EXE file for the node.js application. And I try to build but it's not working, it shows a Build succeeded message then I go to refer to the application folder I can't get anything. I tried to build the last couple of weeks. I can't get a result. Plz anyone support me and give a suggestion to build a node.js EXE file.

Thank you

122875-test.png


vs-general
test.png (161.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @mukilanmws-8067

just checking in to see if the below answers helped answer your question. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

Thanks,
Grace

0 Votes 0 ·

Hi @mukilanmws-8067
I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·
ryanchill avatar image
0 Votes"
ryanchill answered

Hi @mukilanmws-8067,

When it comes to NodeJS, you don't create an exe. The Node runtime will start your .js file on a web server instance and expose the port so that it can respond to request. To determine what that start file is, it's set in your package.json file under "main:" or "start:". In Visual Studio NodeJS project, this is done by the <StartupFile /> and <StartWebBrowser /> element tags, VS 2019 and later. When it comes to build, I see that your codebase is js, so there isn't a project build per se, unless if you have to your package.json to copy your code to a /dist type of folder.

I would encourage you to check out https://docs.microsoft.com/en-us/visualstudio/javascript/?view=vs-2019 to become more familiar with Javascript projects in Visual Studio.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PengGe-MSFT avatar image
0 Votes"
PengGe-MSFT answered

Hi @mukilanmws-8067

I found this open source tool to create a single executable out of your node.js apps, this may meet your needs.

Sincerely,
Peng


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.