I have a port number localhost:4500 in angular2, if users will sign in then, I want to change the port number to username.localhost:4500. Ex: abc.localhost:4500. Can anyone please help me? Thanks :)
Asked
Active
Viewed 23 times
0
-
Why do you need to create sub-domains for each user? You can better go with this pattern.. localhost:4500/username1, localhost:4500/username2..etc – miiiii Jan 25 '18 at 06:53
-
But my requirement is to add username before port number. – Sumit Ranjan Jan 25 '18 at 06:59
-
This is part of server and hosting.. not with Angular or Any programming language... this should guide you better.. https://stackoverflow.com/a/42338591/6446770 – miiiii Jan 25 '18 at 07:02