Provides Ktor Server libs for building awesome Kotlin plugins which needs to provide builtin HTTP servers

Overview

Ktor Plugin

Provides Ktor Server libs for building awesome Kotlin plugins which needs to provide builtin HTTP servers.

Requires: https://github.com/PowerNukkit/KotlinPlugin

Included Libraries

Kotlin

How to use in your plugin

Add this dependency to your plugin.yml file (required):

depend:
  - KtorLib 

Add a library dependency to your project using the examples bellow (recommended).

Make your plugin class extend KotlinPluginBase (optional).

Note: We haven't published to the maven central yet, but the snapshots are available at Sonatype OSS snapshots repository.

Gradle (Kotlin DSL)

repositories {
    maven(url="https://oss.sonatype.org/content/repositories/snapshots/")
}

dependencies {
    implementation("org.powernukkit:powernukkit:1.5.1.0-PN")
    implementation("org.powernukkit.plugins:ktor-plugin-lib:1.6.5+0.1.0+2021.11.13-SNAPSHOT")
}

Gradle (Groovy DSL)

repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

dependencies {
    implementation 'org.powernukkit:powernukkit:1.5.1.0-PN'
    implementation 'org.powernukkit.plugins:ktor-plugin-lib:1.6.5+0.1.0+2021.11.13-SNAPSHOT'
}

Maven

<repositories>
    <repository>
        <id>sonatype-oss-snapshots</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.powernukkit</groupId>
        <artifactId>powernukkit</artifactId>
        <version>1.5.1.0-PN</version>
    </dependency>
    <dependency>
        <groupId>org.powernukkit.plugins</groupId>
        <artifactId>ktor-plugin-lib</artifactId>
        <version>1.6.5+0.1.0+2021.11.13-SNAPSHOT</version>
    </dependency>
</dependencies>

Cloning and importing

  1. Just do a normal git clone https://github.com/PowerNukkit/KotlinPlugin.git (or the URL of your own git repository)
  2. Import the build.gradle.kts file with your IDE, it should do the rest by itself

Running

  1. Just do a normal git clone https://github.com/PowerNukkit/KotlinPlugin.git (or the URL of your own git repository)
  2. cd KotlinPlugin (or the name of your project)
  3. ./gradlew run

Debugging

  1. Import the project into your IDE
  2. Make your IDE run the debug gradle task in debug mode

Debuging using IntelliJ IDEA

Import the project and do this:

You might also like...
Live-coding a web server with Ktor

ktor-sample Live-coding a web server with Ktor Ktor is a Kotlin framework dedicated to building asynchronous servers and clients in connected systems.

User Authentication ( Compose  Ktor Server  MongoDB)
User Authentication ( Compose Ktor Server MongoDB)

Utilising Security in android for Authentication and Authorization for Android I would be using mongo db to perform all basic operations no need for f

Spring Boot API for Modern Warfare 2 Dedicated Servers

Spring Boot API for Modern Warfare 2 Dedicated Servers

Flexible switch is a responsive switch with some nice features which developers can use for making awesome switches on android platform.

flexible-switch It is a responsive switch in android, it can resize itself according to its size. It's recommended to use it with ConstraintLayout to

Shoppe - Kotlin and Ktor app, which can easily be deployed to Heroku

[ 🚧 Work in progress 👷‍♀️ ⛏ 👷 🔧️ 👷 🔧 🚧 ] Shoppe Kotlin Multiplatform App

Jambeez-server - Jambeez server with kotlin

jambeez-server How to start Start your own server with: docker pull ghcr.io/jamb

Allowing server admins to backdoor their own server!

DiscordBackdoorBot Allowing server admins to backdoor their own server! What does Discord Backdoor Bot do? Discord Backdoor bot allows the bot owner t

An e-commerce app which provide a new platform to order food items from various restaurants
An e-commerce app which provide a new platform to order food items from various restaurants

Food_App_Internshala An e-commerce app which provide a new platform to order food items from various restaurants. Splash and Login Page Opening of the

Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on.

JavierSC Kotlin template Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on. Features Easy to p

Owner
The Nukkit you know but Powerful!
null
🟣 Opinionated Kotlin libs, DSLs and frameworks to build better web apps

Tegral Tegral is an opinionated collection of Kotlin frameworks, libraries, helpers and DSLs that help you make awesome apps, from web back-ends and b

Zoroark 21 Dec 22, 2022
Integration Testing Kotlin Multiplatform Kata for Kotlin Developers. The main goal is to practice integration testing using Ktor and Ktor Client Mock

This kata is a Kotlin multiplatform version of the kata KataTODOApiClientKotlin of Karumi. We are here to practice integration testing using HTTP stub

Jorge Sánchez Fernández 29 Oct 3, 2022
A server which delivers client configuration settings to an end-user over http.

RuneTopic HTTP Server A server which delivers client configuration settings to an end-user over http. Setup Guide You can host a http server with Dock

Runetopic 2 Dec 1, 2021
KTor-Client---Android - The essence of KTor Client for network calls

KTor Client - Android This project encompasses the essence of KTor Client for ne

Mansoor Nisar 2 Jan 18, 2022
Multiplatform HTTP-Client implementation using Ktor

Kotlin Multiplatform HTTP-Client using Ktor Simple demonstration of a Ktor-based multiplatform HTTP-client in Kotlin Overview base submodule: common c

Jan Weidenhaupt 2 Oct 21, 2022
Test tv - A marketing company needs a simple pluggable application with a RESTful interface

Demo project A marketing company needs a simple pluggable application with a RES

null 0 Jan 18, 2022
Chain Relations is a small casual existential game about life, human needs and long-term relations.

Chain Relations Chain Relations is a small casual existential game about life, human needs and long-term relations. ChainRelations.360p.mp4 Game objec

Andrzej Novosiolov 4 Dec 2, 2022
sample project that shows you how you can use Ktor to creat a server for real Project.

Ktor-Sample This is a sample project that shows you how you can use Ktor to creat a server for real Project. What is done Save data to database (Get a

Mohamed Emad 4 Dec 23, 2022
🍣✨ Simple Ktor server to handle GitHub -> YouTrack, usually for YouTrack Standalone.

?? sushi Simple Ktor server to handle GitHub Issues to YouTrack, usually for YouTrack Standalone. Why? There is not really a definite way to handle Gi

Noelware 2 Nov 11, 2021
Plugin to integrate EventStoreDB into Ktor-Server!

Ktor Plugin EventStoreDB EventStoreDB is an open-source database technology that stores your critical data in streams of immutable events. It was buil

null 7 Sep 1, 2022