You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lean4game/server/leanserver/Main.lean

20 lines
511 B
Plaintext

import GameServer.Watchdog
import GameServer.FileWorker
unsafe def main : List String → IO UInt32 := fun args => do
let e ← IO.getStderr
Lean.enableInitializersExecution
if args[0]? == some "--server" then
MyServer.Watchdog.watchdogMain args
else if args[0]? == some "--worker" then
MyServer.FileWorker.workerMain {}
else
e.putStrLn s!"Expected `--server` or `--worker`"
return 1
-- TODO: Potentially it could be useful to pass in the `gameName` via the websocket connection