How to deploy your node app on Linux, 2016 edition
Please note that this describes something you would do for a toy project. If you do this for work you probably want to:<p>* Install NPM in a way that you can upgrade easily. Your package manager was designed to do this, so use it. Never ever put untracked files in the system directories.<p>* Don&#x27;t git clone into production. You need to know which version was deployed when and where. At the very least set a tag. Better yet, roll a package from that tag (see above) which you then can sign and store. It&#x27;s very easy and there are tools to help.<p>* Schedule when and how you upgrade your operating system, NPM, and your application. To do this you need a way to take an application out of production, which brings us to...<p>* You generally want a load balancer or some sort of web server between the world and your application. This could be as simple as an Apache or nginx. Don&#x27;t muck about with port forwards!<p>* And most importantly, document this down to every command in the internal wiki! Even better, write a Puppet&#x2F;Salt&#x2F;Ansible file and put it under version control.<p>In short: Tools exist for a reason. Use them. Don&#x27;t hack files manually until you master the tools and know why they exist.