feat(smartnetwork): add Rust-powered network diagnostics bridge and IP intelligence lookups
This commit is contained in:
@@ -37,6 +37,14 @@ import { SmartNetwork } from '@push.rocks/smartnetwork';
|
||||
// Basic instance
|
||||
const network = new SmartNetwork();
|
||||
|
||||
// Start the Rust bridge (auto-started on first use, but explicit start is recommended)
|
||||
await network.start();
|
||||
|
||||
// ... use the network instance ...
|
||||
|
||||
// Clean up when done (stops the Rust bridge process)
|
||||
await network.stop();
|
||||
|
||||
// With caching enabled (60 seconds TTL)
|
||||
const cachedNetwork = new SmartNetwork({ cacheTtl: 60000 });
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user