Multi domain name app, with one business logic and different layouts

Hello everyone.
I am starting work on a new project that will be based on several domains. No more than 20 in the future. For now it’s 4. The business logic will be the same for each of the domain name, but the visual layer will not. I want each domain to have a different page layout and own DB.

What is the best way to solve this problem ?

2 Likes

Domain name should be available in conn.host… Based on that you could put_layout before conn is sent. Probably makes sense to have that logic in a plug before the request hits the action in controller.

3 Likes