https://kotlinlang.org logo
#ktor
Title
# ktor
u

Ume Channel

12/04/2023, 6:39 AM
Good day everyone! I just want to ask why is it not working? I just follow the guidelines.
a

Aleksei Tirman [JB]

12/04/2023, 8:36 AM
Can you check the server logs?
u

Ume Channel

12/04/2023, 11:48 AM
There's no server log - why my localhost start 127
a

Aleksei Tirman [JB]

12/04/2023, 12:45 PM
What do you mean? According to the log, the server successfully responds.
u

Ume Channel

12/04/2023, 6:10 PM
This is what i meant. Thank you for responding - I only mean this - I really like ktor because it's simple and I'm just starting out - I just want to learn how it works
s

Shawn

12/04/2023, 7:12 PM
it's because you've configured ktor to redirect requests to port 443 and nothing is listening on that port
the server successfully responds, but the browser then makes a new request that the server cannot answer
if you're just learning about webservers and HTTP and not hosting things over the internet, you don't need to worry about HTTPS for now
if you really want to get HTTPS to work, though, you need to set an
sslPort
in
application.conf#ktor.deployment
Actually, you're configuring the port in code (using
embeddedServer()
, so you need to follow the instructions here: https://ktor.io/docs/ssl.html#embedded-server
💯 1
u

Ume Channel

12/04/2023, 8:50 PM
Thank you for the response. Here's I create a new project and it doesn't work. Maybe my computer is something or my network?
Hello guys! Can someone help me?
I already figured it out - This is close