Skip to content

Commit

Permalink
Fix double var declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsxp committed Jul 11, 2014
1 parent e73e7b7 commit 4e6fcd4
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
var args = process.argv.splice(2);
var formattedArgs = {};

// Required modules
var http = require('http');
var fs = require('fs');
var url = require('url');

// Simple args parse
for (var i = 0, l = args.length; i < l; i ++) {
if (args[i].match(/^-+/)) {
Expand All @@ -12,21 +17,12 @@ for (var i = 0, l = args.length; i < l; i ++) {

// Setup constants
var ROOT_PATH = process.cwd() + '/';
var PORT = formattedArgs['--port'] || 3000;

if (formattedArgs['--root']) {
ROOT_PATH += formattedArgs['--root'] + '/';
}

var PORT = formattedArgs['--port'] || 3000;



// Required modules
var http = require('http');
var fs = require('fs');
var url = require('url');
var ROOT_PATH = process.cwd() + '/';

var types = {
'js' : 'application/javascript',
'json': 'application/json',
Expand Down

0 comments on commit 4e6fcd4

Please sign in to comment.