Using vhost - non-existing routes do not show 404, never time out #81

ragulka opened this Issue Mar 21, 2013 · 1 comment

1 participant


I am trying to set up Locomotive with wildcard subdomains using express vhost but I'm stuck. It seems that I can get the routes to work, but when I hit a route that does not exist, I do not get a 404 like I used to, but instead I am stuck in a forever-lasting request. There even isn't a timout or anything happening, the browser just keeps on waiting for the response.

When I visit: I get this neverending loading
However, when I visit localhost:3000/non-existing-route everything seems to work fine ( I get a 404 error )

PPS. I am also using cluster, if that makes any difference.


Some additional information: the way I have it currently set up is that I use express.vhost in my last initializer, where I also use app.router. Like this:

module.exports = function() {
  global app = this;
  // Listen to vhost

I also tried using app instead of, in which case I do not get an endless loop, but a TypeError: Object #<Locomotive> has no method 'emit' - which happens in connect.vhost middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment