Skip to content

Instantly share code, notes, and snippets.

View portokallidis's full-sized avatar

Nick Portokallidis portokallidis

View GitHub Profile

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.
<!--
This code is a working example of the code shown in the 12devs[0]'s article:
"Rapid Prototyping with AngularJS"[1] by Tom Ashworth[2].
I put it here for reference ;-)
[0] http://12devs.co.uk
[1] http://12devs.co.uk/articles/rapid-prototyping-with-angularjs/
[2] http://twitter.com/phuunet
@portokallidis
portokallidis / html5
Created September 6, 2013 15:51 — forked from elmousa/html5
html5