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

komg

v2.1.8

Published

a mini kong, lightweight microservices manager

Downloads

48

Readme

komg

NPM Version Node Version

A mini kong, lightweight microservices manager.

Admin UI

admin

Installation

Firstly, Node.js and Redis are required.

npm i -g komg

Run

komg

or

komg --port=2350 --db=./db.json --env=prod --redis=redis://127.0.0.1:6379/0 --basic-auth=name1=pass1

then open http://localhost:2350/admin with your browser.

Argv

  • -p/--port, set port for http server, default 2350
  • --db, set db path, default $komg/lib/db_test.json
  • --env, dev/prod, default dev(allow all requests without apikey)
  • --redis, redis url
  • --basic-auth, add a basic authorization for admin

Usage

  • 1.If you add a api like this
{
  "name": "test",
  "path": "/test",
  "targets": [
    {
      "url": "http://localhost:3001",
      "weight": 1,
      "status": 1
    }
  ],
  "consumers": [
    {
      "apikey": "All",
      "status": 1
    }
  ],
  "order": 1
}

your requests to http://localhost:2350/test will be proxied to http://localhost:3001

  • 2.If you add a api like this
{
  "name": "test2",
  "path": "/test2",
  "targets": [
    {
      "url": "http://localhost:3002",
      "weight": 1,
      "status": 1
    }
  ],
  "consumers": [
    {
      "apikey": "adsf1324asdfg",
      "status": 1
    }
  ],
  "order": 1
}

your requests to http://localhost:2350/test2 will be asked an apikey in the headers, like this headers:{Content-Type:'application/json',apikey:'adsf1324asdfg'}

Scalable

If you install komg on server A,server B, your changes on A will be synchronized to B since a subscriber running on each komg, and you just need to press the refresh button to update upstream configs in the memory.

License

MIT