Get started with Aether Framework in minutes.
You can create a new Aether project using the Gradle plugin or by cloning the template.
build.gradle.kts:plugins {
id("codes.yousef.aether.plugin") version "0.6.0.0"
}
aether {
jvmPort = 8080
enableHotReload = true
}
./gradlew aetherInit
Aether applications start with a main function that configures the server.
src/commonMain/kotlin/Main.kt:
import codes.yousef.aether.core.server
import codes.yousef.aether.web.router
fun main() {
val appRouter = router {
get("/") { exchange ->
exchange.respond(body = "Hello, Aether!")
}
get("/hello/:name") { exchange ->
val name = exchange.pathParam("name")
exchange.respond(body = "Hello, $name!")
}
}
server {
port = 8080
router(appRouter)
}.start()
}
Run the application on the JVM with hot reload enabled (if configured):
./gradlew aetherRunJvm
Visit http://localhost:8080 to see your app.
To run the application in a Wasm environment (e.g., Node.js or browser-based runtime):
./gradlew aetherRunWasm