Skip to content

Commit

Permalink
chore: Merge branch 'chore/messaging-refactor' of https://github.com/…
Browse files Browse the repository at this point in the history
…WalletConnect/notify-server into chore/messaging-refactor
  • Loading branch information
chris13524 committed Oct 24, 2023
2 parents d390045 + 7a44f08 commit 2fb45aa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ version = "0.2.0"
edition = "2021"
authors = ["Chris Smith <[email protected]>"]
build = "build.rs"
default-run = "server"

[[bin]]
name = "server"
path = "src/bin/server.rs"

[[bin]]
name = "publisher_service"
path = "src/bin/publisher.rs"

[dependencies]
wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.5.1", features = ["full"] }
Expand Down
19 changes: 19 additions & 0 deletions src/bin/publisher.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use {
dotenv::dotenv,
notify_server::{config::Configuration, Result},
tracing_subscriber::fmt::format::FmtSpan,
};

/// Service for processing queued messages for publish
#[tokio::main]
async fn main() -> Result<()> {
dotenv().ok();
let config = Configuration::new().expect("Failed to load config!");
tracing_subscriber::fmt()
.with_env_filter(config.log_level)
.with_span_events(FmtSpan::CLOSE)
.with_ansi(std::env::var("ANSI_LOGS").is_ok())
.init();
Ok(())
// TODO: Implement publisher service runner
}
1 change: 1 addition & 0 deletions src/main.rs → src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use {
tracing_subscriber::fmt::format::FmtSpan,
};

/// Notify API server
#[tokio::main]
async fn main() -> Result<()> {
let (_signal, shutdown) = broadcast::channel(1);
Expand Down

0 comments on commit 2fb45aa

Please sign in to comment.