@rialo/explorer
v0.1.4
Published
A Next.js application for exploring Rialo clusters, packaged for distribution via npm.
Keywords
Readme
@rialo/explorer
A Next.js application for exploring Rialo clusters, packaged for distribution via npm.
Installation
npm install @rialo/explorer
# or
pnpm add @rialo/explorer
# or
yarn add @rialo/explorerUsage
Starting the Production Server
Run the server with default settings:
npx rialo-explorer
# or
npx rialo-explorer startThe server will start on port 3001 by default. Access it at http://localhost:3001
Custom Port
Specify a custom port using the --port flag or PORT environment variable:
npx rialo-explorer start --port 4000
# or
PORT=4000 npx rialo-explorerEnvironment Variables
You can pass any Next.js environment variables to customize the frontend:
NEXT_PUBLIC_CUSTOM_RPC_URL=http://localhost:5000 \
npx rialo-explorerCommon environment variables:
PORT- Server port (default: 3001)NEXT_PUBLIC_CUSTOM_RPC_URL- Custom RPC API endpoint URL (default: http://localhost:3001)NEXT_PUBLIC_*- Any other public Next.js variables
Integration Example
Example of using the package in another Node.js project:
// package.json
{
"name": "my-app",
"scripts": {
"explorer": "rialo-explorer start --port 3005"
},
"dependencies": {
"@rialo/explorer": "^0.1.4"
}
}Then run:
npm run explorerOr use it programmatically:
import { spawn } from 'child_process';
const explorer = spawn('rialo-explorer', ['start', '--port', '3005'], {
env: {
...process.env,
NEXT_PUBLIC_CUSTOM_RPC_URL: 'http://localhost:4104'
}
});
explorer.stdout.on('data', (data) => {
console.log(`Explorer: ${data}`);
});License
See the repository's LICENSE file for details.
