Comparing version 0.1.1 to 0.1.2
@@ -7,7 +7,11 @@ var http = require('http'); | ||
start: function() { | ||
start: function( config ) { | ||
var port = config.port || 9001; | ||
var staticDir = config.static || 'public'; | ||
var baseDir = config.base || '.'; | ||
var app = connect() | ||
.use(connect.logger('dev')) | ||
.use(connect.static('public')) | ||
.use(connect_php('.')) | ||
.use(connect.static( staticDir )) | ||
.use(connect_php( baseDir )) | ||
.use(function(req, res){ | ||
@@ -18,4 +22,23 @@ // TODO: add proper 404 content here. | ||
http.createServer( app ).listen( 9001 ); | ||
http.createServer( app ).listen( port ); | ||
console.info('\nServer started at http://localhost:' + port + '/'); | ||
console.info(' - base directory = ' + baseDir + '/' ); | ||
console.info(' - static assets = ' + staticDir + '/'); | ||
console.log('\x1B[32m'); | ||
console.info(' ____'); | ||
console.info(' _.\' : `._'); | ||
console.info(' .-.\'`. ; .\'`.-.'); | ||
console.info(' __ / : ___\ ; /___ ; \ __'); | ||
console.info(' ,\'_ ""--.:__;".-.";: :".-.":__;.--"" _`,'); | ||
console.info(' :\' `.t""--.. \'<@.`;_ \',@>` ..--""j.\' `;'); | ||
console.info(' `:-.._J \'-.-\'L__ `-- \' L_..-;\''); | ||
console.info(' "-.__ ; .-" "-. : __.-" USING THE PHARCE YOU ARE!'); | ||
console.info(' L \' /.------.\ \' J'); | ||
console.info(' "-. "--" .-"'); | ||
console.info(' __.l"-:_JL_;-";.__'); | ||
console.info(' .-j/\'.; ;"""" / .\'\"-.'); | ||
console.log('\n \x1B[39m'); | ||
} | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"author": "Jared Stilwell", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/jared-stilwell/pharce", | ||
@@ -23,4 +23,5 @@ "licenses": [ | ||
"connect": "~2.12.0", | ||
"connect-php": "0.0.1" | ||
"connect-php": "0.0.1", | ||
"commander": "~2.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
3836
35
3
+ Addedcommander@~2.1.0
+ Addedcommander@2.1.0(transitive)