I have this code:
const app = express();
const accountApp = express();
const publicApp = express();
publicApp.use(express.static(path.join(process.cwd(), "web/dist/public")));
accountApp.use(express.static(path.join(process.cwd(), "web/dist/account")));
app.use(vhost('account.*', accountApp));
app.use(publicApp);
It works perfectly on localhost
: http://localhost:3000
shows public app, http://account.localhost:3000
shows account app
I hosted it on heroku, added subdomain like this:
And this is on google domains:
And when I go to www.stravamenu.com
it show public app, as it should. But on account.stravamenu.com
it shows public app instead of account app.
Is the problem in vhost
? Or is it heroku or google domains?