blob: 1aceef1bfdeba461f59bdbf2d4e13744f17d52ce (
plain)
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
|
#include <memory>
#include <cxxopts.hpp>
#include <spdlog/spdlog.h>
#include <mw/url.hpp>
#include <mw/error.hpp>
#include "config.hpp"
#include "data.hpp"
#include "app.hpp"
int main(int argc, char** argv)
{
cxxopts::Options cmd_options(
"shrt", "A naively simple URL shortener");
cmd_options.add_options()
("c,config", "Config file",
cxxopts::value<std::string>()->default_value("/etc/shrt.yaml"))
("h,help", "Print this message.");
auto opts = cmd_options.parse(argc, argv);
if(opts.count("help"))
{
std::cout << cmd_options.help() << std::endl;
return 0;
}
return 0;
}
|