1.0.0 • Published 7 months ago

local-man-server v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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

OptionTypeDefaultDescription
portnumber3000Server port
directorystring"./public"Root directory for static files
workersnumberCPU coresNumber of worker processes
tunnel.enabledbooleantrueEnable/disable LocalTunnel
tunnel.typestring"random""random" or "subdomain"
tunnel.subdomainstringnullCustom subdomain for tunnel
logging.requestsbooleantrueLog incoming requests
logging.errorsbooleantrueLog errors
logging.performancebooleantrueLog performance metrics

License

MIT