I want my Sinatra app to allow users to create an account and access it through a subdomain (i.e. your-account.myapp.com).
I found this to extract subdomains ( http://gist.github.com/55784#file_subdomains.rb ), but I find it hard to implement it.
Any ideas?
I have an account model (datamapper) with a field called the name of the account, which should be a subdomain.
Thank!
source
share