-
-
Save Odilio/86411441ea6e345bd2a1536b5877aa48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ktor | |
import io.ktor.application.* | |
import io.ktor.http.* | |
import io.ktor.response.* | |
import io.ktor.routing.* | |
import io.ktor.server.engine.* | |
import io.ktor.server.netty.* | |
fun main(args: Array<String>) { | |
val server = embeddedServer(Netty, port = 8080) { | |
routing { | |
get("/") { | |
call.respondText("Rota inicial!", ContentType.Text.Plain) | |
} | |
get("/login") { | |
call.respondText("Rota para tela de login!") | |
} | |
} | |
} | |
server.start(wait = true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment