title: Using Nginx along with Node-express server
body: <p>I developed a MEAN app and got ready to host it.
  As a production hosting environment I chose Digital Ocean.
  For deployment I did the below:</p>
  
  <pre><code>1. Started up a droplet with Ubuntu 
  2. Got ready-to-use MEAN image on it.
  3. copied my application from local machine onto this droplet (using flightplan)
  So far so good.. everything works fine.
  </code></pre>
  
  <p>However, I need to serve the application using https, hence I need a digital certificate.</p>
  
  <p>On searching around, I read threads which said, install NGinx and then install 
  the digital certificate. There are a bunch of threads which i am finding it difficult to follow. This is mainly because I have very cursory understanding of this new stack.</p>
  
  <p>At this point I am wondering, my express http server is already serving static files.</p>
  
  <p>Now what will be the role of nginx in this whole equation? how do i route traffic from nginx to express application or vice versa. Do I really need to do this ? Is there no way to install a digital certificate with node ?? </p>
  
  <p>At the end of the day, I need to serve traffic over https.</p>
  
  <p>I would like to achieve this without much complication in my stack.</p>
  
  <p>Any advice ?</p>