@@ -6,13 +6,13 @@ var path = require('path');
66var app = express ( ) ;
77var program = require ( 'commander' ) ;
88app . set ( 'view engine' , 'ejs' ) ;
9- app . set ( 'views' , __dirname + '/views/' ) ;
10- app . use ( express . static ( __dirname + '/public/' ) ) ;
9+ app . set ( 'views' , __dirname + '/views/' ) ;
10+ app . use ( express . static ( __dirname + '/public/' ) ) ;
1111
1212program
1313 . version ( '0.0.1' )
14- . option ( '-d, --dir <directory>' , "Directory to Serve" )
15- . option ( '-p, --port <number>' , "Port" , parseInt )
14+ . option ( '-d, --dir <directory>' , "Directory to Serve" )
15+ . option ( '-p, --port <number>' , "Port" , parseInt )
1616 . parse ( process . argv )
1717
1818var PORT = program . port || process . env . PORT || 3000 ;
@@ -93,15 +93,15 @@ app.get('/', function(req, res) {
9393 } ) ;
9494} ) ;
9595
96- server . listen ( PORT , function ( err ) {
97- console . log ( 'Listening to port ' + PORT ) ;
96+ server . listen ( PORT , function ( err ) {
97+ console . log ( 'Listening to port ' + PORT ) ;
9898 console . log ( 'Enter "ifconfig" or "ip addr" from terminal to find your ip address' ) ;
9999} ) ;
100100
101- process . on ( 'uncaughtException' , function ( err ) {
102- if ( err . syscall == 'listen' ) {
101+ process . on ( 'uncaughtException' , function ( err ) {
102+ if ( err . syscall == 'listen' ) {
103103 console . log ( 'Unable to start Server: Please try changing the port or run with superuser privilages' )
104- } else {
104+ } else {
105105 console . log ( "Unknown Error" )
106106 }
107- } ) ;
107+ } ) ;
0 commit comments