问题
I am trying to figure out a way to route subdomains in Sails.js in such a way, that is completely dynamic, the default routing does not seem to allow this.
For example; if a user goes to theirname.example.com, the route would read that as example.com/users/theirname, and any parameters on the subdomain would tag onto the end /user/theirname. I have been searching the web for quite a few hours for some solid information on how to achieve such a thing.
Any help is much appreciated.
来源:https://stackoverflow.com/questions/22304799/subdomain-routing-in-sails-js