mirror of
https://github.com/aljazceru/pubky-core.git
synced 2025-12-31 21:04:34 +01:00
chore(pubky): add script to run testnet homeserver
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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/*",
|
||||
|
||||
Reference in New Issue
Block a user