Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show world explore url when starting Torii #1565

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
use torii_server::proxy::Proxy;
use tracing::info;
use tracing_subscriber::{fmt, EnvFilter};
use url::Url;
use url::{form_urlencoded, Url};

/// Dojo World Indexer
#[derive(Parser, Debug)]
Expand Down Expand Up @@ -196,8 +196,14 @@
)
.expect("Failed to start libp2p relay server");

info!(target: "torii::cli", "Starting torii endpoint: {}", format!("http://{}", args.addr));
info!(target: "torii::cli", "Serving Graphql playground: {}\n", format!("http://{}/graphql", args.addr));
let endpoint = format!("http://{}", args.addr);
let gql_endpoint = format!("{}/graphql", endpoint);
let encoded: String =
form_urlencoded::byte_serialize(gql_endpoint.replace("0.0.0.0", "localhost").as_bytes())
.collect();
info!(target: "torii::cli", "Starting torii endpoint: {}", endpoint);
info!(target: "torii::cli", "Serving Graphql playground: {}", gql_endpoint);
info!(target: "torii::cli", "World Explorer is available on: {}\n", format!("https://worlds.dev/torii?url={}", encoded));

Check warning on line 206 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L199-L206

Added lines #L199 - L206 were not covered by tests

if let Some(listen_addr) = args.metrics {
let prometheus_handle = prometheus_exporter::install_recorder("torii")?;
Expand Down
Loading