Skip to content

Instantly share code, notes, and snippets.

View gcmartinelli's full-sized avatar
🕶️
NDg2OTcyNjU0ZDY1M2EzYzc1NzM2NTcyM2U0MDcwNzI2Zjc0NmY2ZTZkNjE2OTZjMmU2MzZmNmQwYQo=

gcmartinelli

🕶️
NDg2OTcyNjU0ZDY1M2EzYzc1NzM2NTcyM2U0MDcwNzI2Zjc0NmY2ZTZkNjE2OTZjMmU2MzZmNmQwYQo=
View GitHub Profile
@gcmartinelli
gcmartinelli / curlprototype.kt
Last active December 18, 2020 14:59
A Kotlin/Ktor webserver prototype that receives a string and returns an encoded string to be printed - in color - by a terminal using curl
/* A prototype script that creates a webserver that receives a string and returns
an encoded string to be printed - in color - by a terminal using curl.
Dependency: Kotlin and Ktor (www.ktor.io)
*/
import io.ktor.application.call
import io.ktor.response.respondBytes
import io.ktor.routing.get
import io.ktor.routing.routing
import io.ktor.server.engine.embeddedServer