2023-03-24 09:53:00 +00:00
|
|
|
import std.stdio;
|
|
|
|
|
|
|
|
import cli;
|
|
|
|
import services;
|
|
|
|
|
2023-03-26 11:33:10 +00:00
|
|
|
import consolecolors;
|
|
|
|
|
2023-03-24 09:53:00 +00:00
|
|
|
void main() {
|
|
|
|
ServiceManager serviceManager = new ServiceManager();
|
|
|
|
CliHandler cliHandler = new CliHandler();
|
|
|
|
cliHandler.register("service", new ServiceCommand(serviceManager));
|
2023-03-26 11:33:10 +00:00
|
|
|
cwriteln("Gymboard CLI: Type <cyan>help</cyan> for more information. Type <red>exit</red> to exit the CLI.");
|
2023-03-24 09:53:00 +00:00
|
|
|
while (!cliHandler.shouldExit) {
|
2023-03-26 11:33:10 +00:00
|
|
|
cwrite("> ".blue);
|
2023-03-24 09:53:00 +00:00
|
|
|
cliHandler.readAndHandleCommand();
|
|
|
|
}
|
|
|
|
serviceManager.stopAll();
|
2023-03-26 11:33:10 +00:00
|
|
|
cwriteln("Goodbye!".green);
|
2023-03-24 09:53:00 +00:00
|
|
|
}
|