sub domains in tornado web app for SAAS
self.request.host under tornado.web.RequestHandler will contain subdomain so you can change application logic according to subdomain eg. load current_user based on cookie + subdomain.
I have a web app which runs at www.mywebsite.com.
I am asking user to register and enter a subdomain name for their login. e.g. if user enters subdomain as "demo", then his login url should be "www.demo.mywebsite.com".
How this can be done in tornado web app, as tornado itself is a web server.
Or serving the app with nginx or other web serving services is the only way ?
Thanks for you help in advance.