Skip to content

Commit

Permalink
Revert "examples: add testnet example"
Browse files Browse the repository at this point in the history
This reverts commit eb10086.
  • Loading branch information
Nuhvi committed Nov 13, 2024
1 parent eb10086 commit 6e21959
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 455 deletions.
472 changes: 84 additions & 388 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ path = "./authz/authenticator.rs"
name = "request"
path = "./request/main.rs"

[[bin]]
name = "testnet"
path = "./testnet/main.rs"

[dependencies]
anyhow = "1.0.86"
base64 = "0.22.1"
bytes = "1.8.0"
clap = { version = "4.5.16", features = ["derive"] }
pubky = { path = "../pubky" }
pubky-common = { version = "0.1.0", path = "../pubky-common" }
pubky-homeserver = { version = "0.1.0", path = "../pubky-homeserver" }
reqwest = "0.12.8"
rpassword = "7.3.1"
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
Expand Down
13 changes: 0 additions & 13 deletions examples/testnet/README.md

This file was deleted.

33 changes: 0 additions & 33 deletions examples/testnet/main.rs

This file was deleted.

2 changes: 1 addition & 1 deletion pubky-homeserver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pubky-homeserver"
name = "pubky_homeserver"
version = "0.1.0"
edition = "2021"

Expand Down
12 changes: 0 additions & 12 deletions pubky-homeserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,3 @@ Run with an optional config file
```bash
../target/release/pubky_homeserver --config=./src/config.toml
```

## Testnet

Testnet is a mode where the Homeserver is running locally, connected to an internal Mainline Testnet (not the public DHT), and acting as a Pkarr relay for clients in web browsers.

You can run a homeserver in Testnet by passing an argument:

```bash
cargo run --testnet
```

Or set the `testnet` field in the passed config file to true.
2 changes: 1 addition & 1 deletion pubky/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ wasm-bindgen = "0.2.92"
wasm-bindgen-futures = "0.4.42"

[dev-dependencies]
pubky-homeserver = { path = "../pubky-homeserver" }
pubky_homeserver = { path = "../pubky-homeserver" }
tokio = "1.37.0"

[features]
Expand Down
2 changes: 1 addition & 1 deletion pubky/pkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/pubky/pubky"
},
"scripts": {
"testnet": "cargo run -p pubky-homeserver -- --testnet",
"testnet": "cargo run -p pubky_homeserver -- --testnet",
"test": "npm run test-nodejs && npm run test-browser",
"test-nodejs": "tape test/*.js -cov",
"test-browser": "browserify test/*.js -p esmify | npx tape-run",
Expand Down

0 comments on commit 6e21959

Please sign in to comment.