Skip to content

Loading…

Servers attribute #13

Closed
wants to merge 4 commits into from

2 participants

@eliaskg

Hi,

sometimes it's very needed to access the http server object directly. Therefore I implemented the servers attribute in routes.js

For example when I use socket.IO I can use it with

var io = io.listen(gh.servers()[0]);

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 16, 2010
  1. Access all grasshopping servers through grasshopper object

    Elias Klughammer committed
  2. Access all grasshopping servers through grasshopper object

    Elias Klughammer committed
  3. renderNothing function for simply rendering nothing and ending the re…

    Elias Klughammer committed
    …sponse
  4. Without renderNothing. Not needed

    Elias Klughammer committed
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 grasshopper/lib/routes.js
View
4 grasshopper/lib/routes.js
@@ -85,6 +85,10 @@ exports.api.getSecureController = function(method, path) {
return secureRoutes[method + ':' + path];
};
+exports.api.servers = function() {
+ return servers;
+};
+
function redirectSecure() {
var hostHeader = this.request.headers['host'];
var redirectHost = hostHeader;
Something went wrong with that request. Please try again.