Permalink
Browse files

Updated property names and examples

  • Loading branch information...
1 parent 650995e commit e4a17816858fc0fc56e381fcdfb548fb32a0b37f @kriszyp kriszyp committed Jul 29, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/jsgi-node.js
View
@@ -17,7 +17,7 @@ function:
This adapter should conform to the JSGI 0.3 (with promises) for full
asynchronous support. For example:
- var fs = require("commonjs-utils/fs-promise");
+ var fs = require("promised-io/fs");
require("jsgi-node").start(function(request){
return fs.readFile("jsgi-node.js").then(function(body){
return {
@@ -68,11 +68,11 @@ Request.prototype = {
env:{},
scriptName: "",
scheme:"http",
- get serverName(){
+ get host(){
var host = this.nodeRequest.headers.host;
return host ? host.split(":")[0] : "";
},
- get serverPort(){
+ get port(){
var host = this.nodeRequest.headers.host;
return host ? (host.split(":")[1] || 80) : 80;
},

0 comments on commit e4a1781

Please sign in to comment.