-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot GET / error (express 3.0) #3
Comments
When you say "doesn't work" it's hard to diagnose the problem. The localhost domain will not accept 'wildcard' subdomains by default. You will have to add each full host to your
|
Thanks for quick reply and sorry for not detailed explanation but there was not much code. It is just standard expressjs project. app.use( require('express-subdomain-handler')({ baseUrl: 'localhost', prefix: 'subdomain', logger: true}) ); app.get('/subdomain/:mysubdomain/thepage', function(req, res, next){ and my host file: 127.0.0.1 mysubdomain.node.localhost When i try this page : http://mysubdomain.localhost:1337/thepage I get : Cannot GET /thepage Is there something wrong here that i don't see? |
What version of Express are you using? I wrote this a long time ago for Express 2.0. I have not tried it in Express 3.0. I'm afraid I don't have the time to look into this further, but I would recommend throwing some |
I am using Express 3.0. I'll debug it an see what happens. Thanks. |
app.use( require('express-subdomain-handler')({ baseUrl: 'node.localhost', prefix: 'subdomain', logger: true }) );
app.get('/subdomain/mysubdomain/',some.somert)
mysubdomain.node.localhost:1337 or mysubdomain.localhost:1337
doesn'T work either. what am i doing wrong?
is it something with the version of expressjs?
The text was updated successfully, but these errors were encountered: