Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check express and connect specific features

  • Loading branch information...
commit 15c4624365d7d8bcceb66e31c489e73eef45c98c 1 parent 3e91f2f
@camshaft authored
View
2  bin/startup-middleware
@@ -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]);
});
View
2  bin/startup-routes
@@ -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")]);
View
2  bin/startup-settings
@@ -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]]);
}
View
2  lib/runner.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.