Skip to content

Commit

Permalink
Check express and connect specific features
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Jan 8, 2013
1 parent 3e91f2f commit 15c4624
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/startup-middleware
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var table = new Table({
colWidths: [20, 60]
});

if (!app.stack) return console.error("Express or Connect required for this feature");

app.stack.forEach(function(middleware) {
table.push([(middleware.route || '/'), middleware.handle.name]);
});
Expand Down
2 changes: 2 additions & 0 deletions bin/startup-routes
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var table = new Table({
colWidths: [8, 20, 70]
});

if (!app.routes) return console.error("Express required for this feature");

for(var method in app.routes) {
app.routes[method].forEach(function(route) {
table.push([method, route.path, route.callbacks.join("\n")]);
Expand Down
2 changes: 2 additions & 0 deletions bin/startup-settings
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var table = new Table({
colWidths: [20, 80]
});

if (!app.settings) return console.error("Express required for this feature");

for(var key in app.settings) {
table.push([key, app.settings[key]]);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ module.exports = function(appPath) {
};
});

// TODO do we need to transfer properties from `app` to `server`?

// Start listening on our port
server.listen(port, function() {
console.log("Server listening on port " + port);
Expand Down

0 comments on commit 15c4624

Please sign in to comment.