This commit is contained in:
Your Name
2025-04-30 21:39:07 +12:00
parent fe9c940a22
commit aa234ebef5
2 changed files with 9 additions and 8 deletions

View File

@@ -4,16 +4,17 @@
#include <string>
int main(int argc, char* argv[]) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <config_file>" << std::endl;
std::filesystem::path config_path = std::filesystem::path(std::getenv("HOME")) / ".config/dropshell_template_registry/config.json";
std::filesystem::create_directories(config_path.parent_path());
dropshell::ServerConfig config;
if (!dropshell::load_config(config_path, config)) {
std::cerr << "Failed to load configuration at "<<config_path << std::endl;
return 1;
}
dropshell::ServerConfig config;
if (!dropshell::load_config(argv[1], config)) {
std::cerr << "Failed to load configuration" << std::endl;
return 1;
}
std::cout << "Starting server at " << config.host << ":" << config.port << std::endl;
std::cout << "Object store path: " << config.object_store_path << std::endl;
dropshell::Server server(config);
if (!server.start()) {