# ktor

Vinicius Carvalho

02/27/2019, 1:59 AM
Hi all, how do I get access to the server/port that the app is running? As silly as it seems, I just need to grab those to print in an html template link, just need the server hostname/ip and port


02/27/2019, 8:51 AM
The simple answer is no because not all engines do provide that information. For example a ktor application could be deployed into a servlet container. Servlet containers don't provide any information about active connectors, virtual hosts and so on. So usual solution is to grab this information from request when possible or use config.