-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow loading of server/ as well as server.js
- Loading branch information
AJ ONeal
committed
May 28, 2012
1 parent
d6f65ff
commit 857d7d6
Showing
2 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true*/ | ||
(function () { | ||
"use strict"; | ||
|
||
var app = require('../server.js') | ||
; | ||
|
||
function run() { | ||
var config = require('../config') | ||
, port = process.argv[2] || config.port || 4080 | ||
, server | ||
; | ||
|
||
function listening() { | ||
console.info('Listening on ' + server.address().address + ':' + server.address().port); | ||
} | ||
|
||
server = app.listen(port, listening); | ||
} | ||
|
||
if (require.main === module) { | ||
console.info("\n=== connect-vhoster running in stand-alone mode ===\n"); | ||
run(); | ||
} | ||
|
||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters