2022-04-06 16:52:31 +02:00
|
|
|
module server
|
|
|
|
|
|
|
|
import cli
|
|
|
|
import env
|
|
|
|
|
2022-04-06 17:57:05 +02:00
|
|
|
// cmd returns the cli submodule that handles starting the server
|
2022-04-06 16:52:31 +02:00
|
|
|
pub fn cmd() cli.Command {
|
|
|
|
return cli.Command{
|
|
|
|
name: 'server'
|
|
|
|
description: 'Start the Vieter server'
|
|
|
|
execute: fn (cmd cli.Command) ? {
|
2022-04-06 17:51:06 +02:00
|
|
|
config_file := cmd.flags.get_string('config-file') ?
|
|
|
|
conf := env.load<env.ServerConfig>(config_file) ?
|
2022-04-06 16:52:31 +02:00
|
|
|
|
2022-04-06 16:57:27 +02:00
|
|
|
server(conf) ?
|
2022-04-06 16:52:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|