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

@khgame/loginsvr

v0.2.6

Published

[![Build Status](https://travis-ci.org/khgame/loginsvr.svg?branch=master)](https://travis-ci.org/khgame/loginsvr) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/khgame/loginsvr/master.svg?color=blue) ![GitHub commit activity](htt

Downloads

41

Readme

loginsvr

Build Status GitHub last commit (branch) GitHub commit activity NPM npm (tag)

Quick Start

It will take about 5 minutes to quickly launch a login server.

Requirements

You need to have a nodejs runtime environment installed.

Installation

To install the application, run the following commands. This will download the package @khgame/loginsvr and install it in your global repository.

npm i -g @khgame/loginsvr
kh-loginsvr --version

Now, you will see current version to loginSvr in your console. Hence, you should create a config file at the directory where you need the loginSvr to run. You can manually create a new config file, but the recomended way is using the extract command.

cd /your/awwwwsome/running/directory
kh-loginsvr extract -p ./loginSvr.development.json

the extract command can be executed with the flag '-p', witch allows you specify the config name you can use this to create configs for different enviroments, e.g. loginSvr.production.json if it's didn't set, the default config name is ./loginSvr.development.json

Configuration

After installation, you should got a config file like this: loginSvr.development.json

{
    "name": "loginSvr",
    "id": 0,
    "port": 11801,
    "setting": {
        "log_prod_console": "info"
    },
    "drivers": {
        "mongo": {
            "host": "127.0.0.1",
            "port": 27017,
            "database": "loginSvr",
            "username": "",
            "password": ""
        },
        "redis": {
            "db": 0,
            "family": 4,
            "host": "127.0.0.1",
            "port": 6379,
            "keyPrefix": "khgame:login:",
            "key_mutex_wait_threshold": 100
        },
        "discover/consul": {
            "optional": true,
            "health": {
                "api": "api/v1/core/health"
            },
            "did": {
                "head_refresh": "process"
            }
        }
    },
    "rules": {
        "renewal_time_span": 600,
        "mail_option": {
            "host": "smtp.exmail.qq.com",
            "port": 465,
            "secureConnection": true,
            "auth": {
                "user": "YOUR_EMAIL_ADDRESS",
                "pass": "YOUR_EMAIL_PASS"
            }
        },
        "servers": [
            "AVAILABLE_SERVER_NAME"
        ]
    }
}

Updates these config entrys, replace then with your own setting.

for more information, you can check this document: Configuration

Running

Finally, you can start the loginSvr, just use the command kh-loginsvr start. This command will find the config file loginSvr.development.json, and then start the loginSvr using settings in the configuration file. If the config are not given, it will running with the defult setting, just like the extract command provides. therefore, you can also make your development enviroment match the default config to avoid these prepare operations

Alternatively, there are another ways to start up your login server.

  1. kh-loginsvr start -p will start loginsvr with NODE_ENV=production, and the default config to search will be loginSvr.production.json.
  2. kh-loginsvr start -c my.awwwwsome.config.json will start loginsvr with specified config file.

for more information, you can use the command kh-loginsvr start -h

API usage

see Api