I build an app and I want to make an installer written in nodejs for this app. Installer should do : - update os - change ip / hostname - install nginx, nodejs, node additional modules(pg,pm2,...), postgresql - download app from git hub - make director for config files - run app with pm2
I search on the internet and i found child_process from node and i tried to run bash commands with it but i receive ENOENT error on commands like "apt-get update" ,"apt-get install node".. Seems the function from child_process work only on simple commands like : "ls","pwd". Do you have any advice for me? It is good strategy to make app installer in nodejs or use pure bash commands? Thank you in advice.