Skip to content

Instantly share code, notes, and snippets.

@0xadada 0xadada/app.js
Created Nov 12, 2015

Embed
What would you like to do?
Node apps
var http = require('http');
var s = http.createServer( function( request, response ) {
response.writeHead(301, {
'Content-Type': 'text/plain; charset=utf8',
'Location': 'view-source://visual-assault.org/'
});
response.write( 'hello world\n' );
console.info( '[INFO]', 'user-agent', request.headers['user-agent'] );
} );
s.listen( 8000 );
console.info( '[INFO]', 'Server listening on port 8000' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.