Webframe now listens by default even if you pass in your own server.master
@@ -45,6 +45,8 @@ Creates a new instance, with an optional options argument. | |||
Options: | |||
* `server`: Your own HTTP (like the one created by http.createHttpServer). | |||
* `listen`: Whether to call the `listen` method on the server. Defaults to | |||
true. | |||
* `port`: The port to listen on. Defaults to the PORT environment variable, or | |||
8080. | |||
* `host`: The host to listen on. Defaults to the HOSTNAME environment variable, |
@@ -43,7 +43,10 @@ class App { | |||
this.server = options.server; | |||
} else { | |||
this.server = http.createServer(); | |||
} | |||
// Listen | |||
if (options.listen !== false) { | |||
var port = options.port || process.env.PORT || 8080; | |||
var host = options.host || process.env.HOSTNAME || "127.0.0.1"; | |||
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "webframe", | |||
"version": "0.6.0", | |||
"version": "0.7.0", | |||
"description": "Web framework.", | |||
"main": "index.js", | |||
"scripts": { |