Skip to content

Instantly share code, notes, and snippets.

View cookie-ag's full-sized avatar
:octocat:
I may be slow to respond.

Gautam Anand cookie-ag

:octocat:
I may be slow to respond.
View GitHub Profile
@adunkman
adunkman / index.html
Created January 14, 2012 15:28
Relay messages from RabbitMQ to a browser using Socket.io
<!DOCTYPE html>
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script>
(function () {
var onMessage = function (data) {
// Do something with the message data
};
@manuelzs
manuelzs / websocket_amqp.js
Created May 14, 2011 18:16
Node.js + Socket.io + AMQP
var http = require('http');
var io = require('socket.io');
var sys = require('sys');
var amqp = require('amqp');
server = http.createServer(function(req, res){
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Hello world</h1>');
});