Skip to main content

Brandon Bohling

Deploying Angular Using http-server, Nginx, and PM2

Since it took about an hour to put all the pieces together correctly I thought it best to document how I deployed an Angular (version 2) app using http-server, pm2, and nginx. In my case I deployed to an Ubuntu server hosted on DigitalOcean, but these instructions should work the same as long as you have the other components installed correctly. I am not an expert on this topic. Like most people, I am learning as I go.

A Useful Desktop with Ubersicht

Ubersicht is an OS X utility that allows you to display dynamic (or static) content on your desktop. In the screenshot below I have some static content for a color palette and Git commit standards; all text being selectable. Possibly more interesting though are the other widgets that are always changing. Take the two Strava widgets at the bottom of the screen. One widget allows me to quickly see how my 2016 cycling compares to 2015 and the other just displays some key data from the current year.

Here We Go Again

Feeling the urge to blog again, but of course I cannot just write. First, I have to play with the many different blogging engines. Then pick one. Then research all the ways I can tweak it and optimize my workflow. Then try to migrate my many years of blogging (I recently found “blogging” content from a website I did back in 1997…wow are those images low-res). Finally, start writing. Here’s to completing step 1.

Forgotten Step

Even though I have probably set up a new Mac at least a dozen times in the last few years I keep forgetting the most basic step in the world of Terminal…creating a .bash_profile and adding an export path. This is key because it tells Terminal where to look for executable binaries. Hopefully writing the steps down will make sure I never forget this again. Open TextEdit (or your favorite text editor) Add export PATH="$HOME/bin:$PATH" on the first line Save in your home directory (~/) as .