mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-26 03:58:49 +00:00
add opportunity to set port different with 8080 in WebAppServer sample
This commit is contained in:
parent
c6019b1862
commit
3925ef9423
@ -43,14 +43,13 @@ suspend fun main(vararg args: String) {
|
|||||||
val bot = telegramBot(telegramBotAPIUrlsKeeper)
|
val bot = telegramBot(telegramBotAPIUrlsKeeper)
|
||||||
createKtorServer(
|
createKtorServer(
|
||||||
"0.0.0.0",
|
"0.0.0.0",
|
||||||
8080,
|
args.getOrNull(2) ?.toIntOrNull() ?: 8080,
|
||||||
additionalEngineEnvironmentConfigurator = {
|
additionalEngineEnvironmentConfigurator = {
|
||||||
parentCoroutineContext += Dispatchers.IO
|
parentCoroutineContext += Dispatchers.IO
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
routing {
|
routing {
|
||||||
static {
|
staticFiles("", File("WebApp/build/distributions")) {
|
||||||
files(File("WebApp/build/distributions"))
|
|
||||||
default("WebApp/build/distributions/index.html")
|
default("WebApp/build/distributions/index.html")
|
||||||
}
|
}
|
||||||
post("inline") {
|
post("inline") {
|
||||||
|
Loading…
Reference in New Issue
Block a user