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

bee-hook

v1.0.4

Published

`bee-hook` is a simple, zero-configuration command-line hook server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning. (yes, it's inspired by [http-server](https://www.

Downloads

5

Readme

Bee Hook Server

bee-hook is a simple, zero-configuration command-line hook server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning. (yes, it's inspired by http-server)

Try it now :D

  • API: https://hook.beetech.global
  • Client: https://beetech-global.github.io/bee-hook-client

Installing globally

Installation via npm:

npm install bee-hook -g

Usage

bee-hook [options]

Now you can visit http://localhost:5000 to view your server

Available Options

-p Port to use (defaults to 5000)

API's

Creates new bin to post your requests

URL : /api/bins

Method : POST

Reponses

Code : 200 OK

Content :

{
    "hash": "<hash>",
    "url": "http://localhost:5000/bin/<hash>"
}

Send your requests

URL : /bin/<hash>

Method : { POST | GET | PUT | PATCH | DELETE | OPTIONS }

Body :

{
    "name": "Lucas Daiki",
    "Age": "23"
}

Reponses

Code : 200 OK

Content : No Content


Check your requests

URL : /api/bins/<hash>

Method : GET

Reponses

Code : 200 OK

Content :

{
    "created_at": "2018-02-19T21:56:47.942Z",
    "last_update": "2018-02-19T22:02:40.149Z",
    "bins": [
        {
            "method": "POST",
            "body": {
                "name": "Lucas Daiki",
                "Age": "23"
            },
            "query": {},
            "headers": { ... },
            "created_at": "2018-02-19T22:01:17.784Z"
        },
        {
            "method": "GET",
            "body": { },
            "query": { "test": "123" }, // ?test=123
            "headers": { ... },
            "created_at": "2018-02-19T22:02:40.149Z"
        }
    ],
    "total": 2
}

List all bins

URL : /api/bins

Method : GET

Reponses

Code : 200 OK

Content :

[
    {
        "hash":"grqjbf8bti",
        "created_at":"2018-02-21T23:24:05.488Z",
        "last_update":"2018-02-21T23:26:00.595Z",
        "total":50
    },
    {
        "hash":"hhyasd12x",
        "created_at":"2018-02-21T23:24:05.488Z",
        "last_update":"2018-02-23T23:26:00.595Z",
        "total":6
    }
]

Delete a hash

URL : /api/bins/<hash>

Method : DELETE

Reponses

Code : 200 OK

Content : No Content


Deployment (Heroku)

  • Clone the bee-hook repository

  • Install heroku See more

  • Login Heroku

heroku login
  • Create an app on Heroku
heroku create
  • Deploy your hook server :D
git push heroku master
  • Open the new url
heroku open
  • Configuring self url
$ heroku apps:info hook-mock
...
# Web URL: <url>

$ heroku config:set HOST=<url>

Deployment (PM2)

  • Clone the bee-hook repository
  • Add your server key as deployment key in repository
  • Edit ecosystem.conf.js
  • Setup application on server - run this in your machine - pm2 deploy production setup
  • Deploy application - run this in your machine - pm2 deploy production --force