I know it's not necessary to run the app since the...
# ktor
k
I know it's not necessary to run the app since the previous steps are working fine
d
Can you show your
application.conf
file?
k
Copy code
ktor {
    deployment {
        port = 8080
    }

    application {
        modules = [ blog.BlogAppKt.main ]
    }
}
d
ext.ktor_version = ‘0.9.1’ -> ext.ktor_version = ‘0.9.2’ ?
k
0.9.1
d
uhm why are you using
implementation
in dependencies?
instead of
compile
?
k
since the gradle version is > 3.0 and it's a single gradle module
let me try changing to compile and see if that works
d
I don’t know but it is usually safer to follow the exact steps at least to get it working initially (or use a sample as an entry point), then you can mutate small things
k
still not working
in that part of the documentation I don't see a github repo sample 🤔
d
git-clone this repo: https://github.com/ktorio/ktor-samples/ and run .
/gradlew :netty-embedded:run
also
gradle :netty-embedded:run
(to see if there is a problem with your global gradle distro)
d
Still it is strange that you have an error with
Top-level function 'main' not found in package 'io.ktor.server.netty'
while having
blog.BlogAppKt.main
in your application.conf
check that your kt file has the right package and recheck your application.conf in the resources folder
k
just a question
Then we delete the main function from BlogApp.kt and change fun Application.module() to fun Application.main().
the docs mention this
d
you can also build a simple project with this tool: https://soywiz.github.io/start-ktor-io-proposal/
k
o nvm
cool thanks I will reply if anything changes
what are you supposed to run on the generated project?
nvm
gradlew run
is the one
so new thing...
No configuration setting found for key 'ktor'
and I got it working now
seems like that guide may be outdated
the last steps are removing the resource folder inside main folder and put it in the same level
in that case it will find the configuration