Skip to content

Instantly share code, notes, and snippets.

@0xadada
Created November 12, 2015 16:42
Show Gist options
  • Select an option

  • Save 0xadada/34df9d97c268f27594c9 to your computer and use it in GitHub Desktop.

Select an option

Save 0xadada/34df9d97c268f27594c9 to your computer and use it in GitHub Desktop.

Revisions

  1. 0xadada created this gist Nov 12, 2015.
    13 changes: 13 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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' );