creating standalone node js application installer

I have already read a lot of links that answer the question. But I had a specific doubt,so here we go!! Our App uses angular js for UI and node js backend server

This is the way I have planned to execute the objective of creating a standalone applications

  1. I would have a shell script run that would minify(not obfuscate -> because in a lot of places, I read obfuscate would create some bugs and minify is a safe enough option) all the JS source files in my application sources
  2. Then I would zip them all into one compressed folder
  3. I would give the customer the compressed folder and a shell script
  4. When the customer runs the shell script,It would decompress the folder and then run all the commands that we manually run to get the app started.

So everytime the customer wants the app , he can just run the shell script(when the files are already extracted, then the decompress step would be skipped.)

Is this approach fine? can I get on with it ?

Ok, your idea can work technically. But it's not very user friendly. The problems I can see off top of my head:

  • You need manual installation and maintenance of node executable
  • The user gets an ugly console application they have to keep around
  • It is not clear how to end application. Close console window? Close browser tab? Browser window?

If I needed to do this, I would go with something like node-webkit or appjs.

These frameworks allow you to bundle a webkit-based browser with a node executable. You click on an exe, and what you see is a stripped down browser window, with your node.js app powering it silently underneath. No console window, separate browser etc. There's a bridge between the browser part and node, so you don't even need to use ajax to communicate (although nothing is stopping you).

Probably too late to switch at this point, but maybe something to keep in mind in the future.