-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (27 loc) · 777 Bytes
/
main.cpp
File metadata and controls
33 lines (27 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Copyright © 2024 Vortex project
*
* This is the source code of the Vortex project.
* It is licensed under the MIT License; you should have received a copy
* of the license in this archive (see LICENSE).
*
* Author: Abolfazl Abbasi
*
*/
#include <fstream>
#include <iostream>
#include "src/vortex_app.h"
int main(const int argc, char *argv[]) {
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <get_config-file-path>" << std::endl;
return 1;
}
const std::string configFilePath = argv[1];
if (!std::ifstream(configFilePath)) {
std::cerr << "Config file not found: " << configFilePath << std::endl;
return 1;
}
auto server = vortex::vortex_app(configFilePath);
server.start();
return 0;
}