# lwsjs/local-web-server

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/lwsjs-local-web-server).**

1,269 stars · 89 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/lwsjs/local-web-server
- awesome-repositories: https://awesome-repositories.com/repository/lwsjs-local-web-server.md

## Topics

`backend` `full-stack` `lws` `progressive-web-app` `server` `single-page-app` `web-development` `web-server` `webapp` `webapplication`

## Description

This project is a command-line development web server designed to serve static files and proxy network requests. It functions as a modular, middleware-based server that allows developers to chain custom functions to handle request parsing, response compression, and URL rewriting.

The server distinguishes itself through its ability to simulate complex network environments and production-like security configurations. It supports secure encrypted connections via HTTPS and restricts access to hosted resources using basic authentication protocols. Additionally, it provides specialized routing for single-page applications by redirecting missing file paths to a primary index file, ensuring client-side routing frameworks function as expected.

Beyond its core hosting capabilities, the server includes tools for traffic management and observability. It features pattern-matching URL routing to map requests to local files or remote destinations, and it provides real-time console logging to monitor request traffic and performance metrics. The server is configurable through middleware policies that manage access control, resource blacklisting, and API integration.

## Tags

### Web Development

- [Web Application Development Toolkits](https://awesome-repositories.com/f/web-development/web-application-development-toolkits.md) — Provides a command-line tool for serving static files and proxying network requests to support full-stack development.
- [Web Server Hosting](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/web-server-hosting.md) — Hosts local web servers with support for secure protocols and configurable connection limits. ([source](https://github.com/lwsjs/local-web-server/wiki/CLI-usage))
- [Static File Hosting](https://awesome-repositories.com/f/web-development/static-file-hosting.md) — Serves static web files from local directories with automatic index file resolution. ([source](https://github.com/lwsjs/local-web-server/blob/master/README.md))
- [Static File Servers](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-server-capabilities/static-asset-serving/plugin-static-file-serving/static-file-servers.md) — Serves local files and directories over standard protocols to test and preview web interfaces.
- [API Proxy Servers](https://awesome-repositories.com/f/web-development/api-proxy-servers.md) — Forwards specific URL patterns to remote services or local back-end servers to simulate complex network environments.
- [Request Interception Middlewares](https://awesome-repositories.com/f/web-development/request-interception-middlewares.md) — Provides a modular middleware pipeline to intercept, modify, and log HTTP traffic during development.
- [Static Asset Serving](https://awesome-repositories.com/f/web-development/static-asset-serving.md) — Delivers static files from local directories over standard web protocols for testing. ([source](https://github.com/lwsjs/local-web-server#readme))
- [Single Page Application Hosting](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/http-servers/single-page-application-hosting.md) — Redirects missing file paths to a primary index file to support client-side routing frameworks.

### Networking & Communication

- [Middleware-Based Request Pipelines](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/request-processing-architectures/request-processing/middleware-based-request-pipelines.md) — Processes incoming HTTP requests through a modular chain of middleware functions.
- [HTTP Proxies](https://awesome-repositories.com/f/networking-communication/http-proxies.md) — Acts as an intermediary to forward incoming traffic to local or remote destinations for API integration.
- [Local Web Interfaces](https://awesome-repositories.com/f/networking-communication/local-web-interfaces.md) — Makes local files accessible via web browsers to facilitate rapid interface development. ([source](https://github.com/lwsjs/local-web-server/tree/master/bin))
- [Middleware-Based Servers](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/routing-engines/middleware-based-servers.md) — Functions as a modular server that chains custom functions to handle request parsing, compression, and rewriting.
- [External Proxy Forwarding](https://awesome-repositories.com/f/networking-communication/request-proxies/proxy-routing/external-proxy-forwarding.md) — Forwards network requests to external services to integrate remote APIs into local development.
- [URL Routing Proxies](https://awesome-repositories.com/f/networking-communication/request-proxies/url-routing-proxies.md) — Routes incoming traffic to local or remote destinations based on URL patterns. ([source](https://github.com/lwsjs/local-web-server/blob/master/README.md))

### Software Engineering & Architecture

- [Single Page Applications](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/application-architecture-patterns/single-page-applications.md) — Redirecting all incoming requests to a primary index file to ensure client-side routing frameworks function correctly in web applications.
- [Composable Middleware Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/request-interception-middleware/composable-middleware-pipelines.md) — Allows chaining custom middleware functions to manage complex request processing flows. ([source](https://github.com/lwsjs/local-web-server#readme))

### Data & Databases

- [Development Proxy Integrations](https://awesome-repositories.com/f/data-databases/dataframe-integration/remote-api-wrappers/development-proxy-integrations.md) — Forwards URL patterns to external servers to integrate remote APIs during development. ([source](https://github.com/lwsjs/local-web-server#readme))

### Development Tools & Productivity

- [Request Path Rewriters](https://awesome-repositories.com/f/development-tools-productivity/path-managers/path-modifiers/request-path-rewriters.md) — Intercepts and rewrites incoming request paths to map them to local files or remote proxy destinations. ([source](https://github.com/lwsjs/local-web-server/wiki/How-to-rewrite-URLs-to-local-or-remote-destinations))
- [Route Pattern Matching](https://awesome-repositories.com/f/development-tools-productivity/regular-expressions/route-pattern-matching.md) — Maps incoming request paths to local files or remote proxies using regular expression patterns.

### Security & Cryptography

- [Request Authentication Middleware](https://awesome-repositories.com/f/security-cryptography/request-authentication-middleware.md) — Provides middleware-based authentication to restrict access to local development resources.
- [Local Development HTTPS](https://awesome-repositories.com/f/security-cryptography/reverse-proxy-security/self-hosted-https-configurations/local-development-https.md) — Enables encrypted HTTPS connections for local development environments to simulate production security. ([source](https://github.com/lwsjs/local-web-server/blob/master/README.md))
- [Sensitive File Protections](https://awesome-repositories.com/f/security-cryptography/security/policies/host-resource-access/file-system-access-controls/sensitive-file-protections.md) — Blocks public access to sensitive files and system paths to prevent unauthorized exposure during development. ([source](https://github.com/lwsjs/local-web-server/wiki/CLI-usage))
- [Access Authentication](https://awesome-repositories.com/f/security-cryptography/user-access-management/access-authentication.md) — Secures hosted resources by requiring valid credentials through standard basic authentication protocols. ([source](https://github.com/lwsjs/local-web-server#readme))

### System Administration & Monitoring

- [Request Traffic Monitors](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/operational-health-alerting/health-monitoring-endpoints/request-traffic-monitors.md) — Tracks request activity and performance metrics to help identify traffic patterns. ([source](https://github.com/lwsjs/local-web-server#readme))
- [Real-Time Application Log Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/real-time-application-log-monitoring.md) — Outputs real-time access logs and request statistics to the console for visibility. ([source](https://github.com/lwsjs/local-web-server/wiki/CLI-usage))
- [Real-Time Server Activity Monitors](https://awesome-repositories.com/f/system-administration-monitoring/real-time-monitoring-systems/server-command-monitoring/real-time-server-activity-monitors.md) — Logs request traffic and performance statistics to the console for debugging application behavior. ([source](https://github.com/lwsjs/local-web-server/blob/master/README.md))
- [System Logging and Debugging](https://awesome-repositories.com/f/system-administration-monitoring/system-logging-and-debugging.md) — Captures and displays real-time request traffic and performance metrics in the console.
