another tip: I'm using react and the react-router cannot handle path in URL correctly. So I use a different port for different spa. Use "app.MapWhen(o => o.Request.Host == 6000, ...)" to handle this case.
In production, should be something like : MapWhen(o => o.Request.Host.Host == "a.com"...