npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ii887522/reverse-proxy

v2.0.0

Published

It is a server that forwards client request to the correct web server for processing, and also forwards server response to the correct web client browser for presentation.

Downloads

23

Readme

reverse-proxy

Semantic Versioning 2.0.0 JavaScript Style Guide Linux Windows made-with-javascript made-with-typescript Npm package version Npm package daily downloads Npm package license Npm package dependents

It is a server that forwards client request to the correct web server for processing, and also forwards server response to the correct web client browser for presentation.

Table of contents

Usage

reverse-proxy <config-file-path>

config-file-path: It must exists and must not ends with either '/' or '\'.

A config file passed in must follow the format below:

{
  "keyPath": {
    "type": "string",
    "required": true,
    "format": "[^/\\]$"
  },
  "certPath": {
    "type": "string",
    "required": true,
    "format": "[^/\\]$"
  },
  "routes": {
    "type": "array",
    "required": true,
    "value": [
      {
        "hostname": {
          "type": "string",
          "required": true
        },
        "target": {
          "type": "string",
          "required": true
        }
      }
    ]
  }
}

Usage example

{
  "keyPath": "test/key.pem",
  "certPath": "test/cert.pem",
  "routes": [
    {
      "hostname": "example.dynv6.net",
      "target": "http://localhost:1024"
    },
    {
      "hostname": "www.example.dynv6.net",
      "target": "http://localhost:1024"
    },
    {
      "hostname": "abcdefg.dynv6.net",
      "target": "http://localhost:1025"
    },
    {
      "hostname": "www.abcdefg.dynv6.net",
      "target": "http://localhost:1025"
    }
  ]
}

Coding Style

This project follows Javascript Standard Style. Please familiarize yourself with the rules provided in the coding style and make sure all the proposed code changes in your commits are conforming to the style before making a merge request. You can also make use of StandardJS - Javascript Standard Style which is a Visual Studio Code plugin and npm run lint command under the Lint project section to support you.

Prerequisites

Install dependencies

npm install

Lint the project

npm run lint

Build the project

npm run build

Automatically build the project on save

npm run build:watch

Automatically restart the project on change

npm run dev <config-file-path>

Start the project

npm start <config-file-path>

Test the project with code coverage analysis

npm test

Automatically test the project with code coverage analysis on change

npm run test:watch