Skip to content

Instantly share code, notes, and snippets.

View Sarfarazsajjad's full-sized avatar
🤠
playing django

Sarfaraz Hussain Sarfarazsajjad

🤠
playing django
View GitHub Profile
@Sarfarazsajjad
Sarfarazsajjad / app.js
Last active August 29, 2015 14:06 — forked from bobbydavid/app.js
var express = require('express')
, http = require('http')
, connect = require('connect')
, io = require('socket.io');
var app = express();
/* NOTE: We'll need to refer to the sessionStore container later. To
* accomplish this, we'll create our own and pass it to Express
* rather than letting it create its own. */
var sessionStore = new connect.session.MemoryStore();
// early experiments with node had mysterious double requests
// turned out these were for the stoopid favicon
// here's how to short-circuit those requests
// and stop seeing 404 errors in your client console
var http = require('http');
http.createServer(function (q, r) {
// control for favicon