Hi there. Currently I am running a fairly complicated SaaS (Rails only) project and is due to upgrade to something bigger on front-end (+ API access) and since I have some experience with Ember it makes sense to go for it. I am at planning stage to get my head around how I would achieve functionality without many regressions for existing clients. Currently my app hosts multiple clients (using Apartment gem on Rails side) where each client gets its own subdomain, eg.:
While Sign Up is handled via signup.example.com, as you can imagine example.com runs on its own server (marketing stuff), so DNS config is literally set to redirect any URL with wildcard subdomain to Rails App, which handles log in functionality (if client exists - show login page client.example.com/login, otherwise redirect to find your account/sign up page). So my question is how would this structure look with Ember on top of all this? In theory I am thinking of any URL with Subdomain would be redirected to Ember app (starting point signup/app/whatever.example.com for non-existing accounts), while Ember App itself would talk to rails api via api.example.com/clientExample/v1/…? Would this work or it has some obvious stupid mistake which I have not thought about yet? Thank you.