Skip to content

Commit

Permalink
Fixed examples/stack-middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 14, 2010
1 parent 94753af commit ecd078d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/stack-middleware/app.js
@@ -1,9 +1,9 @@

module.exports = require('./lib/connect').createServer([
module.exports = require('./../../lib/connect').createServer([
{ module: require('./hello') },
{ module: require('./world') },
{ module: {
handle: function(err, req, res){
handle: function(req, res){
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('GET /hello or /world');
}
Expand Down
4 changes: 2 additions & 2 deletions examples/stack-middleware/hello.js
@@ -1,7 +1,7 @@

module.exports = require('./lib/connect').createServer([
module.exports = require('./../../lib/connect').createServer([
{ module: {
handle: function(err, req, res){
handle: function(req, res){
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello');
}
Expand Down
1 change: 0 additions & 1 deletion examples/stack-middleware/lib/connect

This file was deleted.

4 changes: 2 additions & 2 deletions examples/stack-middleware/world.js
@@ -1,7 +1,7 @@

module.exports = require('./lib/connect').createServer([
module.exports = require('./../../lib/connect').createServer([
{ module: {
handle: function(err, req, res){
handle: function(req, res){
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('World');
}
Expand Down
3 changes: 2 additions & 1 deletion lib/connect/index.js
Expand Up @@ -22,6 +22,7 @@ var sys = require('sys'),
Url = require('url'),
Path = require('path'),
assert = require('assert');

// Response extensions

require('./response');
Expand Down Expand Up @@ -84,7 +85,7 @@ function Layer(config, env) {
if (this.setup) {
this.setup.apply(this, config.params);
}
};
}

Layer.prototype = {
name: 'unnamed',
Expand Down

0 comments on commit ecd078d

Please sign in to comment.