Skip to content

Commit

Permalink
Added config example
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 16, 2010
1 parent 9911d7d commit 6bd9402
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/config/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

/**
* Module dependencies.
*/

var http = require('http');

// Use `$ connect -C examples/config`
// to chdir, and auto-discover config.js or
// Use `$ connect --config examples/config/config examples/config/app`
// to pass an explicit path to your configuration file, and
// then load the app relative to the CWD

module.exports = http.createServer(function(req, res){
res.writeHead(200, {
'Content-Type': 'text/plain'
});
res.end('Wahoo');
});
6 changes: 6 additions & 0 deletions examples/config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

module.exports = {
name: 'production',
port: 4321,
host: '127.0.0.1'
}

0 comments on commit 6bd9402

Please sign in to comment.