gcole
12/06/2018, 3:12 AMktor {
deployment {
environment = development
port = 8080
autoreload = true
watch = [ org/grcole/bfw ]
}
application {
modules = [ org.grcole.bfw.BFWApplicationKt.main ]
}
}
but when I run it, it tells me there are no watched locations:
[grcole@C02WP0CRHTDG bfw (master)]$ ./gradlew :run
> Task :run
2018-12-05 19:04:49.865 [main] INFO Application - No ktor.deployment.watch patterns match classpath entries, automatic reload is not active
2018-12-05 19:04:50.295 [main] INFO Application - Responding at <http://0.0.0.0:8080>
Is there a 'best practice link' for env setup for a noob?samir
12/08/2018, 1:20 PMgcole
12/12/2018, 2:12 AMsamir
12/15/2018, 11:21 AMDanilo Herrera
12/18/2018, 12:48 AMdeployment {
port = 8080
port = ${?PORT}
watch = [ MyFirstProject ]
}
This only watches the class changes, therefore the project will need to recompiled, thus requiring:
2. Run gradle -t build
to recompile when there are changes.
3. In a separate terminal tab, run gradle run
. Unfortunately, the auto reload didn't work when I ran the application via IntelliJ as opposed to the terminal.
After following these steps, every time I made a change in IntelliJ I would switch to the browser and the change would be reflected after refreshing (often had to refresh two or three times while the project recompiled). If anyone finds a better way, please let us know 🙂