chore(pubky): add script to run testnet homeserver

This commit is contained in:
nazeh
2024-07-29 09:35:56 +03:00
parent d64f610102
commit ce2a00f020
2 changed files with 10 additions and 5 deletions

View File

@@ -23,6 +23,9 @@ let keypair = Keypair.random();
let homeserver = PublicKey.try_from("8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo");
await client.signup(keypair, homeserver)
// Verify that you are signed in.
const session = await client.session(publicKey)
```
## Test and Development
@@ -39,11 +42,11 @@ Clone the Pubky repository:
```bash
git clone https://github.com/pubky/pubky
cd pubky/
cd pubky/pkg
```
Run the testnet server
Run the local testnet server
```bash
cargo run --bin pubky_homeserver -- --testnet
npm run testnet
```

View File

@@ -9,11 +9,13 @@
"url": "https://github.com/pubky/pubky"
},
"scripts": {
"test": "tape test/*.js -cov",
"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",
"build": "cargo run --bin bundle_pubky_npm",
"preinstall": "npm run build",
"prepublishOnly": "npm run build && npm run test && npm run test-browser"
"prepublishOnly": "npm run build && npm run test"
},
"files": [
"nodejs/*",