|
|
|
@ -44,6 +44,7 @@ main(int ac, const char* av[])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto port_opt = opts.get_option<string>("port");
|
|
|
|
|
auto bindaddr_opt = opts.get_option<string>("bindaddr");
|
|
|
|
|
auto bc_path_opt = opts.get_option<string>("bc-path");
|
|
|
|
|
auto deamon_url_opt = opts.get_option<string>("deamon-url");
|
|
|
|
|
auto ssl_crt_file_opt = opts.get_option<string>("ssl-crt-file");
|
|
|
|
@ -103,6 +104,8 @@ main(int ac, const char* av[])
|
|
|
|
|
//cast port number in string to uint
|
|
|
|
|
uint16_t app_port = boost::lexical_cast<uint16_t>(*port_opt);
|
|
|
|
|
|
|
|
|
|
string bindaddr = *bindaddr_opt;
|
|
|
|
|
|
|
|
|
|
// cast no_blocks_on_index_opt to uint
|
|
|
|
|
uint64_t no_blocks_on_index = boost::lexical_cast<uint64_t>(*no_blocks_on_index_opt);
|
|
|
|
|
|
|
|
|
@ -766,13 +769,13 @@ main(int ac, const char* av[])
|
|
|
|
|
if (use_ssl)
|
|
|
|
|
{
|
|
|
|
|
cout << "Staring in ssl mode" << endl;
|
|
|
|
|
app.port(app_port).ssl_file(ssl_crt_file, ssl_key_file)
|
|
|
|
|
app.bindaddr(bindaddr).port(app_port).ssl_file(ssl_crt_file, ssl_key_file)
|
|
|
|
|
.multithreaded().run();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cout << "Staring in non-ssl mode" << endl;
|
|
|
|
|
app.port(app_port).multithreaded().run();
|
|
|
|
|
app.bindaddr(bindaddr).port(app_port).multithreaded().run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|