Skip to content

Instantly share code, notes, and snippets.

View manish-manghwani's full-sized avatar
💬

Manish Manghwani manish-manghwani

💬
View GitHub Profile
@SubSide
SubSide / 1. RouteProcessor.kt
Last active July 25, 2024 12:08
An easy way to register controller methods in Ktor. This helps clean up some code.
import io.ktor.application.ApplicationCall
import io.ktor.application.call
import io.ktor.http.HttpMethod
import io.ktor.routing.Route
import io.ktor.routing.Routing
import io.ktor.routing.route
import kotlin.reflect.KFunction
import kotlin.reflect.full.callSuspendBy
import kotlin.reflect.full.declaredMemberFunctions
import kotlin.reflect.jvm.javaType
# Installing Apache, PHP and MySQL
sudo apt install -y apache2
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt install -y zip unzip git curl
sudo apt-get install -y php7.3-fpm php7.3-cli php7.3-gd php7.3-mysql \
php7.3-mbstring php7.3-xml php7.3-curl \
php7.3-bcmath php7.3-sqlite3 php7.3-zip