Subdomain Routing in Sails.js

故事扮演 提交于 2019-12-10 20:56:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!