@developerpritam/proxylens
v0.0.1
Published
CLI for ProxyLens AI Traffic Inspector
Maintainers
Readme
ProxyLens Node SDK
Connect your local Node.js/Express application to the ProxyLens AI Inspector.
Installation
npm install proxylens-nodeUsage with Express
const express = require('express');
const http = require('http');
const ProxyLens = require('proxylens-node');
const app = express();
const server = http.createServer(app);
// 1. Initialize ProxyLens with your HTTP server
const lens = new ProxyLens(server);
// 2. Add Middleware (before your routes)
app.use(express.json()); // Ensure body parsing is enabled if needed
app.use(lens.middleware());
// Your Routes
app.get('/api/users', (req, res) => {
res.json([{ name: 'Alice' }, { name: 'Bob' }]);
});
// Start Server
server.listen(3000, () => {
console.log('Server running on port 3000');
console.log('ProxyLens Inspector WebSocket available at ws://localhost:3000/_proxylens');
});Connecting the UI
- Open ProxyLens Web App.
- Click Connect Local in the header.
- Enter
ws://localhost:3000/_proxylens(default). - Watch your traffic appear in real-time!
