app port changed to 8081

master
moneroexamples 9 years ago
parent 38681e063a
commit 74ecbcae4c

@ -1,11 +1,9 @@
#include "src/CmdLineOptions.h"
#include "src/MicroCore.h"
#include "src/page.h"
#include "ext/crow/crow.h"
#include "mstch/mstch.hpp"
#include "ext/format.h"
#include <fstream>
@ -19,7 +17,25 @@ namespace epee {
}
int main() {
int main(int ac, const char* av[]) {
// get command line options
xmreg::CmdLineOptions opts {ac, av};
auto help_opt = opts.get_option<bool>("help");
// if help was chosen, display help text and finish
if (*help_opt)
{
return 0;
}
auto port_opt = opts.get_option<string>("port");
auto bc_path_opt = opts.get_option<string>("bc-path");
uint16_t app_port = boost::lexical_cast<uint16_t>(*port_opt);
path blockchain_path {"/home/mwo/.bitmonero/lmdb"};
@ -75,7 +91,7 @@ int main() {
});
app.port(8080).multithreaded().run();
app.port(app_port).multithreaded().run();
// set timezone to orginal value
if (tz_org != 0)

@ -23,16 +23,12 @@ namespace xmreg
desc.add_options()
("help,h", value<bool>()->default_value(false)->implicit_value(true),
"produce help message")
("txhash,t", value<string>(),
"transaction hash")
("viewkey,v", value<string>(),
"private view key string")
("address,a", value<string>(),
"monero address string")
("port,p", value<string>()->default_value("8081"),
"default port")
("bc-path,b", value<string>(),
"path to lmdb blockchain")
("testnet", value<bool>()->default_value(false)->implicit_value(true),
"is the address from testnet network");
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:18081"),
"monero address string");
store(command_line_parser(acc, avv)

@ -19,9 +19,11 @@
#include "../ext/dateparser.h"
#include "../ext/infix_iterator.h"
#include <boost/lexical_cast.hpp>
#include <boost/filesystem.hpp>
#include <boost/optional.hpp>
#include "boost/date_time/posix_time/posix_time.hpp"
#include <boost/date_time/posix_time/posix_time.hpp>
#include <string>
#include <vector>

Loading…
Cancel
Save