Skip to content

Instantly share code, notes, and snippets.

View musdom's full-sized avatar

Adam Mashrique musdom

View GitHub Profile

Keybase proof

I hereby claim:

  • I am musdom on github.
  • I am musdom (https://keybase.io/musdom) on keybase.
  • I have a public key ASAphkYKwd3RcaNaoO1XLTX-_f_GNg02WCy8seH-oiks8Qo

To claim this, I am signing this object:

@musdom
musdom / node-on-ec2-port-80.md
Created November 24, 2015 12:15 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80

The Problem

Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)

The temptingly easy but ultimately wrong solution:

Alter the port the script talks to from 8000 to 80:

}).listen(80);