Learning project for Kotlin concurrency/coroutine concepts with an Angular frontend and local Kotlin JVM examples.
frontend/- Angular app for lessons and the Kotlin Lab UI.coroutine-examples/- Maven/Kotlin project used by the local Kotlin runner.
- Node.js 22
- npm 10+
- Java 21
- Maven
Open two terminals.
cd frontend
nvm use 22
npm start -- --host 127.0.0.1Angular runs at:
http://127.0.0.1:4200/
cd frontend
nvm use 22
npm run kotlin-runnerThe local Kotlin runner runs at:
http://127.0.0.1:3001
The Kotlin Lab sends selected lesson programs to this runner so examples execute on the local JVM instead of the embedded Kotlin Playground.
If the UI keeps showing Starting Kotlin through local JVM runner..., restart the runner terminal after code changes. A successful request prints start/finish lines in the runner terminal.
Quick runner check:
curl -sS -X POST http://127.0.0.1:3001/run-kotlin \
-H 'Content-Type: application/json' \
--data '{"code":"fun main() { println(\"Hello, world!\") }","timeoutMs":600000}'That start call returns a runId. Poll it to read the latest output:
curl -sS http://127.0.0.1:3001/run-kotlin/1From frontend/:
npm run build
npx tsc -p tsconfig.app.json --noEmit
npm run kotlin-runnerFrom coroutine-examples/:
mvn -q -DskipTests compile exec:java