Deploy App Node.js on localhost (Production)

6

I developed an application with Angular + Node.js.

The only detail is that there is no centralized server (Node.js), that is, each client will have its version of the server running on your network.

Because of this, I had to create ways to install the app on Node.js easily on each client, I tested an alternative that did not have the expected return:

  • Installing the App as a windows service

Where I made a .bat with the commands for installing dependencies, adding ports on the firewall, installing services, etc.

To do this I used the "node-windows" lib: link

However, most computers do not run the script. You have to run again, sometimes you acknowledge the permission error, in others it appears on the console that worked, but at the time of checking the services. they are not there, anyway .. I did several tests, changes and did not solve.

Given this, I would like to know:

  • Is there any transparent or simplified form ("Generate an executable" ?! Maybe)

  • I have read in some places that IIS is used to host the application, has anyone had experience in this regard, do you have some example of the operation?

asked by anonymous 27.02.2017 / 14:14

1 answer

5

If your application uses Node + AngularJS, one possibility is to generate an executable via Electron .

It already comes with embedded NodeJS. However you can use npm packages and generate installers containing all the modules in use, with the advantage that the user does not need to install any specific browser (since the Electron engine itself is a version of Chrome).

    
27.02.2017 / 14:56