![]() Src/main/kotlin/com/example/Application. Invoke the Project view and open the Application.kt file placed by the following path: To run the created Ktor application, follow the steps below: Now we are ready to run the created application. ![]() Start typing routing in the top left search box, find Routing in the list, and click Add.Ĭlick Create and wait until IntelliJ IDEA generates a project and installs the dependencies. On the next page, you can choose a set of plugins - building blocks that provide common functionality of a Ktor application, for example, authentication, serialization and content encoding, compression, cookie support, and so on.įor now, let's install only the Routing plugin to handle incoming requests. In this tutorial, we leave the default values for these settings. Ktor version: Choose the required Ktor version.Įngine: Select an engine used to run a server.Ĭonfiguration in: Choose whether to specify server parameters in code or in a HOCON file.Īdd sample code: Leave this option enabled to add sample code for plugins added on the next page. Website: Specify a domain used to generate a package name.Īrtifact: This field shows a generated artifact name. This can be Gradle with Kotlin or Groovy DSL, or Maven. Location: Specify a directory for your project.īuild System: Choose the desired build system. On the right pane, you can specify the following settings: In the New Project wizard, choose Ktor from the list on the left. Otherwise, from the main menu, select File | New | Project. On the Welcome screen, click New Project. To create a new Ktor project, open IntelliJ IDEA, and follow the steps below: If you are using IntelliJ IDEA Community Edition, use the Ktor Project Generator instead. This section describes project setup using the Ktor plugin for Intellij IDEA Ultimate. Make sure the Ktor plugin is installed and enabled. From the Welcome to IntelliJ IDEA dialog, you can do the following: Create a new project. If you use IntelliJ IDEA Community or other IDE, you can generate a Ktor project using a web-based project generator. In this guide, we'll show you how to create, run, and test a simple Ktor application. You can create and configure a new Ktor project using a dedicated plugin for IntelliJ IDEA Ultimate, or using a web-based project generator. Ktor is an asynchronous framework for creating microservices, web applications, and more.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |