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

manga-js-server

v1.4.3

Published

Project to up a manga server using http and/or socket io

Downloads

7

Readme

Manga JS Server

manga.js logo

The purpose of this project is to create a state machine server to keep organized data and be able to add listeners with socket.io in specific paths and in addition to providing a possible form of messages between socket.io clients.

It's posible to dispose data by http protocol

HTTP and HTTPS

For all examples consider this data struture:

{
    my:{
        data:{
            points: {
                current:43
            },
            info:{
                name: "Test",
                keys: ["a", "b", { x: 1, y: 2 }]
            }
        }
    }
}

Methods

get '/ping'

Just to check if server and shows server stats

{
    started: new Date(),
    stats:{
        gets:0,
        sets:0,
        listeners:0,
        clear:0,
        delete:0,
        reset:0,
        message:0
    }
}

get

get '/get'

params: path

To get values based in path

Example:

/get?path=my.data.points

Result:

{
    "current":43
}

set

post '/set'

To update value based on path, but merging with server values

Example:

/set

Body:

{
    "path": "my.data.points",
    "value": {
        last: 12
    }
}

Return

{
    "success": true
}

After change the result of my.data.points will be:

{
    "current": 43,
    "last": 12
}

reset

post '/reset'

The same as /set but overwrite server value

Example:

/reset

Body:

{
    "path": "my.data.points",
    "value": {
        last: 12
    }
}

Return

{
    "success": true
}

After change the result of my.data.points will be:

{
    "last": 12
}

The current all values will be lost

message

post '/message'

Body Params:

{
    path:string, value:any
}

Message do not save data. But if some client was connected by socket.io, they will receive the message sent by this method.

| There is no http listener clients. Is not possible to receive messages by http

delete

post '/delete'

Body:

{ path: string }

Remove data based on path

clear

post '/clear'

Delete all data on server

Donate:

If this project helps you, please donate

https://www.paypal.com/donate/?hosted_button_id=TX922XCPET8QG

donation qrcode image

Documentation

See documentation on github

https://github.com/state-machine-solutions/State-Machine-Solutions-Documentation