package Ġlog d . cli Ċ Ċ import Ġcom . github . aj alt . cli kt . core . Cli kt Command Ċ import Ġlog d . App Ċ import Ġlog d . logging . Logging ServiceImpl Ċ import Ġlog d . web . Web Controller Ċ import Ġorg . http 4 k . server . Under tow Ċ import Ġorg . http 4 k . server . as Server Ċ import Ġorg . slf 4 j . LoggerFactory Ċ Ċ class ĠSer ve Command ( val Ġapp : ĠApp ) Ġ: ĠCli kt Command ( name Ġ= Ġ" serve ") Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlog Ġ= ĠLoggerFactory . getLogger ( java Class ) ĊĊĠĠĠ Ġoverride Ġfun Ġrun () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontroller Ġ= ĠWeb Controller ( Logging ServiceImpl ( app . db )) ĊĠĠĠĠĠĠĠ Ġval Ġserver Ġ= Ġcontroller . as Http Handler (). as Server ( Under tow ( app . config . listen . port )) ĊĠĠĠĠĠĠĠ Ġlog . info (" Starting Ġserver Ġat Ġport Ġ{} .", Ġserver . port ()) ĊĠĠĠĠĠĠĠ Ġserver . start (). block () ĊĠĠĠ Ġ} Ċ } Ċ