![]() Using the gutter icon next to the main function. You can run a server Ktor application in one of the following ways: On the next page, you can choose a set of plugins - building blocks that provide common functionality of a Ktor application, such as authentication, serialization and content encoding, compression, cookie support, and so on.Ĭlick Create and wait until IntelliJ IDEA generates a project and installs the dependencies. ![]() You can also generate a plugin's code for the existing project using the completion popup. 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, in a HOCON or Yaml file.Īdd sample code: Use this option to add sample code for plugins, which will be 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. Migrating projects to the latest Ktor version. ![]() Generating tests for routes and adding sample code for Ktor plugins.Ĭode editing assistance, including completion and renaming route names. Navigating between routes across a project. IntelliJ IDEA provides the following capabilities for working with Ktor projects:Ī dedicated run configuration for running and debugging Ktor projects. It supports multiple platforms, including JVM, JavaScript, and Kotlin/Native. You can use it to create server-side as well as client-side applications. The next time you open a project from one of those locations, IntelliJ IDEA will automatically load the project.Ktor is a web application framework for creating connected systems. On the Trusted Locations settings page, specify the local directories that the IDE should trust. In the Settings dialog ( Control+Alt+S), go to Build, Execution, Deployment | Trusted Locations. You can add your home directory to the trusted locations to disable IntelliJ IDEA's warnings about untrusted projects. You can configure what sources IntelliJ IDEA should consider safe and load such projects automatically during the opening process. GDSL scripts: any Groovy DSL scripts will not be executed.įile Watcher scripts will not wake up and run corresponding tools. VCS support: VCS support is fully disabled. Startup tasks: any scripts or tasks that are executed during the opening process are disabled. So, no build scripts are executed and no dependencies are resolved. The Gradle, Maven, or sbt import: for a project that contains any build tool, the importing process is disabled. If you open a project in Safe Mode, the following limitations will apply: Next time you open a project from that directory, it will be opened and loaded automatically. Select the Trust projects in checkbox to trust the directory from which you are trying to open the project. Trust Project: in this case, IntelliJ IDEA opens and initializes the project, resolves project plugins, adds dependencies, and enables all IntelliJ IDEA features.ĭon't Open: in this case, IntelliJ IDEA cancels the action. You can click the Trust project… link and load your project at any time. IntelliJ IDEA notifies you about Safe Mode on top of the editor area. Preview in Safe Mode: in this case, IntelliJ IDEA opens the project in Safe Mode, meaning you can browse the project's sources, but there are restrictions in executing code, performing build-related activities, and running scripts.įor more information on Safe Mode preview limitations, refer to Safe mode preview limitations. You can select one of the following actions: This helps to ensure that the project is safe to perform the following actions: When you open any project, IntelliJ IDEA immediately lets you decide how to handle a project that contains unfamiliar source code.Įvery time you open a project for the first time, the IDE shows the Trust Project dialog. You can configure trusted locations to automatically load projects from particular directories. IntelliJ IDEA warns you about tasks or configurations that will be executed during the opening process and lets you configure sources that you can trust. To prevent potential security risks, IntelliJ IDEA lets you decide how to open a project if you're not sure about its source.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |