Skip to content

Instantly share code, notes, and snippets.

@sifu
Created September 16, 2010 10:22
Show Gist options
  • Save sifu/582215 to your computer and use it in GitHub Desktop.
Save sifu/582215 to your computer and use it in GitHub Desktop.
var http = require( 'http' ),
parse = require( 'querystring' ).parse;
http.createServer( function( request, response ) {
var body = '';
request.on( 'data', function( chunk ) {
body += chunk.toString( );
} );
request.on( 'end', function( ) {
console.info( parse( body ) );
} );
response.writeHead( 200, { 'Content-Type': 'text/html' } );
response.end( 'OK\n' );
} ).listen( 8824 );
console.log( 'Server running at http://127.0.0.1:8824' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment