Skip to content

Commit 2f9b2fe

Browse files
ElviraMustafinavnikolova
authored andcommitted
two options for running with Gradle
1 parent ef351a6 commit 2f9b2fe

1 file changed

Lines changed: 24 additions & 11 deletions

File tree

topics/server-development-mode.topic

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,43 @@
6161

6262
<chapter title="The 'io.ktor.development' system property" id="system-property">
6363
<p>
64-
The <control>io.ktor.development</control> <a href="https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html">system property</a>
65-
allows you to enable development mode when running your application:
64+
The <control>io.ktor.development</control>
65+
<a href="https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html">system property</a>
66+
allows you to enable development mode when running your application.
67+
</p>
68+
<p>
69+
To run an application in development mode using IntelliJ IDEA,
70+
pass <code>io.ktor.development</code> with the <code>-D</code> flag to
71+
<a href="https://www.jetbrains.com/help/idea/run-debug-configuration-kotlin.html#1">VM options</a>:
72+
</p>
73+
<code-block>
74+
-Dio.ktor.development=true
75+
</code-block>
76+
<p>
77+
If you run your application using a <a href="server-dependencies.topic">Gradle</a> task,
78+
you can enable development mode in one of two ways:
6679
</p>
6780
<list>
6881
<li>
6982
<p>
70-
To run an application in development mode using IntelliJ IDEA,
71-
pass <code>io.ktor.development</code> with the <code>-D</code> flag to
72-
<a href="https://www.jetbrains.com/help/idea/run-debug-configuration-kotlin.html#1">VM options</a>:
83+
Configure the <code>ktor</code> block in your <path>build.gradle.kts</path> file:
7384
</p>
74-
<code-block>
75-
-Dio.ktor.development=true
85+
<code-block lang="Kotlin">
86+
ktor {
87+
development = true
88+
}
7689
</code-block>
7790
</li>
7891
<li>
7992
<p>
80-
If you run your application using a <a href="server-dependencies.topic">Gradle</a> task,
81-
you can enable development mode for the current run using the Gradle CLI flag:
93+
Enable development mode for a single run by passing a Gradle CLI flag:
8294
</p>
83-
<code-block>
84-
./gradlew run -Pio.ktor.development=true
95+
<code-block lang="bash">
96+
./gradlew run -Pio.ktor.development=true
8597
</code-block>
8698
</li>
8799
</list>
100+
88101
<tip>
89102
<p>
90103
You can also use the <code>-ea</code> flag to enable development mode.

0 commit comments

Comments
 (0)