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 🙏

© 2025 – Pkg Stats / Ryan Hefner

yh-server

v0.0.3

Published

It is a http-server in localhost

Readme

简介

>这是一个本地的服务器,可以通过yh-server命令来开启本地服务器。

使用

### 使用前提
    - 本地已经全局安装node
### 使用方法
    1. 可以通过以下命令查看使用方式
        > $ yh-server -h
    2. 您将看到四种命令
        ```
            -V, --version  output the version number
            --port <port>  http-server start at this port
            --dir <dir>    http-server start at this directory
            -h, --help     output usage information
        ```
        - -V或--version,用于查看版本
        - --port <port>,用于起其本地服务时,输入端口,例如--prot 3030
        - --dir <dir>,用于起本地服务时,输入根服务器地址,例如--dir c:/yuhua,则表示在c:/yuhua目录下起本地服务
    3. 起一个本地服务
        - 在某目录下,执行如下命令,表示在该目录下,起本地服务,默认端口8080。在浏览器中输入localhost:8080,则可以访问本地服务器中该目录下的所有文件或文件夹
            > $ yh-server
        - 设置端口:默认端口为8080,如果您不想使用该端口,则可以通过--port <port>来起一个自定义端口的服务。自定义端口建议大于3000。
            > $ yh-server --port 3030
        - 设置服务器根目录:默认服务器根目录为执行当前命令的目录,如果您自定义目录,则可以通过--dir <dir>来起一个自定义目录的服务。
            > $ yh-server --dir c:/yuhua

注意:

- 您无需担心端口被占用的情况,我们对端口被占用做了明确提示“Do you want to start at new port?(y or n)”,输入“y”后表示您想设置新端口起服务,则会出现新的提示让您输入新的端口——“please input the port you wanted start and this value bigger then 3000:”,您只需输入满足该提示要求的端口号即可。
- 端口号要求:大于3000的未被占用的数字