I would like to give the user a sub domain with their user name when they sign up.
Example is a user with josh sign up, I would like to give him a sub domain josh.example.com where his profile is visible. Is this possible in meteor js?
I would like to give the user a sub domain with their user name when they sign up.
Example is a user with josh sign up, I would like to give him a sub domain josh.example.com where his profile is visible. Is this possible in meteor js?
There is a solution on the Meteor Forums. It involves using a wildcard dns entry:
Use a DNS wildcard to point *.example.com to your app server, then determine the hostname in your client code:
var hostnameArray = document.location.hostname.split( "." ); var hostname = hostnameArray[0];
if ( hostname ) { // here you can do whatever you need to do with the hostname }