# nnws-tiny **Repository Path**: chen-binfa/nnws-tiny ## Basic Information - **Project Name**: nnws-tiny - **Description**: 配置版本的nnws - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-08 - **Last Updated**: 2026-04-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # nnws-tiny A lightweight Web proxy server based on Node.js, designed for request proxying and resolving cross-origin issues in local development environments. ## Introduction nnws-tiny is a simple Web proxy server with the following main features: - Request Proxying: Forwards client requests to target servers - Cross-Origin Handling: Resolves cross-origin issues via CORS middleware - Request Body Fixing: Processes and repairs request bodies during proxying - Static Resource Compression: Compresses response content using the compression middleware ## Installation 1. Ensure Node.js and npm are installed 2. Clone the repository: ```bash git clone https://gitee.com/chen-binfa/nnws-tiny.git ``` 3. Navigate to the project directory and install dependencies: ```bash cd nnws-tiny npm install ``` ## Usage 1. Modify the configuration file `config-example.json` as needed 2. Start the server: ```bash node app.js ``` ## Configuration - `config-example.json`: Example configuration file containing proxy settings and other options - `app.js`: Main program file with proxy middleware and route configurations - `util.js`: Utility functions file containing logging and host information retrieval functions ## Directory Structure ``` . ├── app.js # Main program file ├── config-example.json # Example configuration file ├── package.json # Project dependencies and script configurations ├── public/ # Static resources directory │ └── index.html # Default static page ├── static-web.js # Static resource service configuration └── util.js # Utility functions ``` ## Dependencies - express: Web framework - cors: Cross-Origin Resource Sharing middleware - http-proxy-middleware: For creating proxy middleware - compression: Response compression middleware - history: HTML5 History API middleware - moment: Date processing library ## License MIT License Copyright (c) 2023 Chen Binfa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.