diff --git a/README.md b/README.md index 2359e1c..201aede 100644 --- a/README.md +++ b/README.md @@ -184,50 +184,25 @@ int main() #include #include #include -#include + using namespace vix; int main() { - App app; - vix::p2p::NodeConfig cfg; - cfg.node_id = "A"; + cfg.node_id = "node-A"; cfg.listen_port = 9001; auto node = vix::p2p::make_tcp_node(cfg); vix::p2p::P2PRuntime runtime(node); - runtime.start(); - - vix::p2p_http::P2PHttpOptions opt; - opt.prefix = "/api/p2p"; - opt.enable_ping = true; - opt.enable_status = true; - opt.enable_peers = true; - opt.enable_logs = true; - opt.enable_live_logs = true; - opt.stats_every_ms = 250; - - vix::p2p_http::registerRoutes(app, runtime, opt); - - app.static_dir("./public"); - app.get("/", [](Request &, Response &res){ - res.file("./public/index.html"); - }); - app.get("/connect", [](Request &, Response &res){ - res.file("./public/connect.html"); - }); + runtime.start(); - app.listen(5178, [](const vix::utils::ServerReadyInfo &info){ - console.info("UI API listening on", info.port); - }); + console.info("Node A running on port 9001"); + runtime.wait(); // blocks - app.wait(); - runtime.stop(); + return 0; } - - ``` --- diff --git a/modules/p2p b/modules/p2p index fc3ef1d..b648b76 160000 --- a/modules/p2p +++ b/modules/p2p @@ -1 +1 @@ -Subproject commit fc3ef1d450c06949e78543a7faa4aea1c591b337 +Subproject commit b648b769298d71eed36b5d122c60ccf6aa0d0537