{"id":13407069,"url":"https://github.com/ktorio/ktor","last_synced_at":"2026-03-04T16:03:35.015Z","repository":{"id":35852337,"uuid":"40136600","full_name":"ktorio/ktor","owner":"ktorio","description":"Framework for quickly creating connected applications in Kotlin with minimal effort","archived":false,"fork":false,"pushed_at":"2025-05-13T10:26:47.000Z","size":53582,"stargazers_count":13570,"open_issues_count":166,"forks_count":1132,"subscribers_count":174,"default_branch":"main","last_synced_at":"2025-05-13T11:05:37.575Z","etag":null,"topics":["async","asynchronous","kotlin","web","web-framework"],"latest_commit_sha":null,"homepage":"https://ktor.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktorio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-03T16:49:36.000Z","updated_at":"2025-05-13T09:18:23.000Z","dependencies_parsed_at":"2023-09-23T07:03:38.910Z","dependency_job_id":"7d418d4f-eef5-4d93-a5f3-3f80a2c2cfc5","html_url":"https://github.com/ktorio/ktor","commit_stats":{"total_commits":5253,"total_committers":326,"mean_commits":"16.113496932515336","dds":0.6573386636207881,"last_synced_commit":"1eeb7c11c93ad1cce550c71df1a189d22c74148f"},"previous_names":["kotlin/ktor"],"tags_count":173,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktorio%2Fktor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktorio%2Fktor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktorio%2Fktor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktorio%2Fktor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktorio","download_url":"https://codeload.github.com/ktorio/ktor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929362,"owners_count":21985802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asynchronous","kotlin","web","web-framework"],"created_at":"2024-07-30T20:00:19.097Z","updated_at":"2026-03-04T16:03:34.993Z","avatar_url":"https://github.com/ktorio.png","language":"Kotlin","readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/ktorio/ktor/main/.github/images/ktor-logo-for-dark.svg\"\u003e\n    \u003cimg alt=\"Ktor logo\" src=\"https://raw.githubusercontent.com/ktorio/ktor/main/.github/images/ktor-logo-for-light.svg\"\u003e\n  \u003c/picture\u003e\n\n\u003c/div\u003e\n\n[![Official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\n[![Maven Central](https://img.shields.io/maven-central/v/io.ktor/ktor-server)](https://central.sonatype.com/search?namespace=io.ktor)\n[![Kotlin](https://img.shields.io/badge/kotlin-2.3.0-blue.svg?logo=kotlin)](https://kotlinlang.org)\n[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/ktor/)\n[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/ktorio/ktor)\n\nKtor is an asynchronous framework for creating microservices, web applications and more. Written in Kotlin from the\nground up.\n\nFirst add the dependency to your project:\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"io.ktor:ktor-server-netty:$ktor_version\")\n}\n```\n\nThen create an `Application` and install some features:\n\n```kotlin\nimport io.ktor.server.netty.*\nimport io.ktor.server.routing.*\nimport io.ktor.server.application.*\nimport io.ktor.http.*\nimport io.ktor.server.response.*\nimport io.ktor.server.engine.*\n\nfun main(args: Array\u003cString\u003e) {\n    embeddedServer(Netty, 8080) {\n        routing {\n            get(\"/\") {\n                call.respondText(\"Hello, world!\", ContentType.Text.Html)\n            }\n        }\n    }.start(wait = true)\n}\n```\n\nYou also can use [Ktor Gradle Plugin](https://github.com/ktorio/ktor-build-plugins) to configure bom, run tasks and deployment:\n```kotlin\nplugins {\n    id(\"io.ktor.plugin\") version \"3.1.1\"\n}\n\ndependencies {\n    implementation(\"io.ktor:ktor-server-netty\")\n}\n```\n\nTo run the created application, execute:\n```shell\n./gradlew run\n```\n\n* Runs embedded web server on `localhost:8080`\n* Installs routing and responds with `Hello, world!` when receiving a GET http request for the root path\n\n## Start using Ktor\n\nBuild your first Kotlin HTTP or RESTful application using Ktor: [start.ktor.io](https://start.ktor.io)\n\n## Principles\n\n#### Unopinionated\n\nKtor Framework doesn't impose a lot of constraints on what technology a project is going to use – logging,\ntemplating, messaging, persistence, serialization, dependency injection, etc.\nSometimes it may be required to implement a simple interface, but usually it is a matter of writing a\ntransforming or intercepting function. Features are installed into the application using a unified *interception*\nmechanism\nwhich allows building arbitrary pipelines.\n\nKtor Applications can be hosted in any servlet container with Servlet 3.0+ API support such as Tomcat, or\nstandalone using Netty or Jetty. Support for other hosts can be added through the unified hosting API.\n\nKtor APIs are mostly functions calls with lambdas. Thanks to Kotlin DSL capabilities, the code looks declarative.\nApplication composition is entirely up to the developer's choice – with functions or classes, using dependency injection\nframework or doing it all manually in the main function.\n\n#### Asynchronous\n\nThe Ktor pipeline machinery and API are utilising Kotlin coroutines to provide easy-to-use asynchronous\nprogramming model without making it too cumbersome. All host implementations are using asynchronous I/O facilities\nto avoid thread blocking.\n\n#### Testable\n\nKtor applications can be hosted in a special test environment, which emulates a web server to some\nextent without actually doing any networking. It provides easy way to test an application without mocking\ntoo much stuff, and still achieve good performance while validating application calls. Running integration tests with a\nreal\nembedded web server are of course possible, too.\n\n## JetBrains Product\n\nKtor is an official [JetBrains](https://jetbrains.com) product and is primarily developed by the team at JetBrains, with\ncontributions\nfrom the community.\n\n## Documentation\n\nPlease visit [ktor.io](https://ktor.io) for Quick Start and detailed explanations of features, usage and machinery.\n\n* Getting started with [Gradle](https://ktor.io/docs/gradle.html)\n* Getting started with [Maven](https://ktor.io/docs/maven.html)\n* Getting started with [IDEA](https://ktor.io/docs/intellij-idea.html)\n\n## Reporting Issues / Support\n\nPlease use [our issue tracker](https://youtrack.jetbrains.com/issues/KTOR) for filing feature requests and bugs. If\nyou'd like to ask a question, we recommend [StackOverflow](https://stackoverflow.com/questions/tagged/ktor) where\nmembers of the team monitor frequently.\n\nThere is also community support on the [Kotlin Slack Ktor channel](https://app.slack.com/client/T09229ZC6/C0A974TJ9)\n\n## Reporting Security Vulnerabilities\n\nIf you find a security vulnerability in Ktor, we kindly request that you reach out to the JetBrains security team via\nour [responsible disclosure process](https://www.jetbrains.com/legal/terms/responsible-disclosure.html).\n\n## Inspirations\n\nKotlin web frameworks such as Wasabi and Kara, which are currently deprecated.\n\n## Contributing\n\nPlease see [the contribution guide](CONTRIBUTING.md) and the [Code of conduct](CODE_OF_CONDUCT.md) before contributing.\n","funding_links":[],"categories":["Libraries","Kotlin","Android 应用","开发框架","Back-End Development","Network"],"sub_categories":["Network","🌎 Network","Web","网络服务_其他","SQL"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktorio%2Fktor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktorio%2Fktor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktorio%2Fktor/lists"}