.
This commit is contained in:
25
src/main.cpp
Normal file
25
src/main.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "server.hpp"
|
||||
#include "config.hpp"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc != 2) {
|
||||
std::cerr << "Usage: " << argv[0] << " <config_file>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
dropshell::ServerConfig config;
|
||||
if (!dropshell::load_config(argv[1], config)) {
|
||||
std::cerr << "Failed to load configuration" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
dropshell::Server server(config);
|
||||
if (!server.start()) {
|
||||
std::cerr << "Failed to start server" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user