Skip to content

Instantly share code, notes, and snippets.

@natestarner
natestarner / socket_client.html
Created March 31, 2012 01:44
Socket.io and nginx workaround
<!-- include that socket client that socket.io serves out -->
<script src="//yourdomain.com:8080/socket.io/socket.io.js"></script>
<script type="text/javascript">
//connect your client to the socket server. Make sure that you specify
//the port here. It needs to be the same as what nodejs is listening on
var chat = io.connect("yourdomain.com:8080");
//add all your chat.on custom events next
</script>
@natestarner
natestarner / Nodejs Instructions
Created March 8, 2012 05:50
Complete Nodejs Environment Setup
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment.
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules.
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted)
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need:
a. sudo apt-get install openssh-server
b. sudo apt-get install libssl-dev
c. sudo apt-get install git
d. sudo apt-get install g++
e. sudo apt-get install make