1.0.0 • Published 7 months ago
local-man-server v1.0.0
Local Man Server
A powerful Node.js server with automatic tunneling and multi-processing capabilities. Perfect for local development and testing.
Features
- 🚀 Multi-process support for handling concurrent requests
- 🌍 Automatic LocalTunnel integration
- 📊 Performance monitoring and logging
- 🔒 Built-in security features
- ⚡ Rate limiting
- 🎯 CORS support
- 📁 Static file serving
- 🔄 Auto-restart for dead workers
Installation
npm install local-man-server
Quick Start
const startServer = require('local-man-server');
// Start with default configuration
startServer();
// Or with custom configuration
startServer({
port: 8080,
directory: "./public",
workers: 4,
tunnel: {
enabled: true,
type: "subdomain",
subdomain: "myapp"
}
});
Configuration Options
Option | Type | Default | Description |
---|---|---|---|
port | number | 3000 | Server port |
directory | string | "./public" | Root directory for static files |
workers | number | CPU cores | Number of worker processes |
tunnel.enabled | boolean | true | Enable/disable LocalTunnel |
tunnel.type | string | "random" | "random" or "subdomain" |
tunnel.subdomain | string | null | Custom subdomain for tunnel |
logging.requests | boolean | true | Log incoming requests |
logging.errors | boolean | true | Log errors |
logging.performance | boolean | true | Log performance metrics |
License
MIT
1.0.0
7 months ago