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 🙏

© 2026 – Pkg Stats / Ryan Hefner

shiyue-boot

v1.0.4

Published

`是shiyue的一种服务模式,只创建一个App;shiyue可提供创建多个App,即开启多套http服务`

Readme

shiyue-boot 使用教程

基于epii-boot npm包引擎,开启一套http服务

是shiyue的一种服务模式,只创建一个App;shiyue可提供创建多个App,即开启多套http服务

如何使用

1、终端运行 npm install shiyue-boot 安装想要 npm 包 2、终端运行 tsc --init 生成 tsconfig.json 文件 3、终端运行 npm init -y 生成 package.json 文件 4、终端运行 npm install @types/node -D 安装 node 基本模块 5、新建 src 文件夹 在文件夹里面新建 epii.boot.ts 文件,shiyue-boot 需要识别 epii.boot.ts 文件 所以必须建这个文件 就是项目的入口文件

shiyue-boot.ts 会自动创建一个 App 不需要项目来单独创建,项目只需要设置一些方法即可

写一个基本的接口

epii.boot.ts 文件

import {Route} from "shiyue-boot";

export default function(){
    Route("/login",function(ctx){
        ctx.success("登录成功")
    })
}

项目启动

在 package.json 里面设置

"scripts": {
  "dev":"epii-boot-run-ts",
},

直接运行 npm run dev 即可启动项目 还可以直接运行 npx epii-boot-run-ts 浏览器访问 http://127.0.0.1:8080/login 返回

{"success":true,"msg":"成功","data":"登录成功","code":1}

这样一个基本的接口就写好了

开放的方法

  1. Use
  2. Port
  3. Route
  4. Module
  • 使用以上方法可以不考虑App
  • 不能链式调用

1、Use

 // 加载中间件,中间件可以在每次web请求时做相应的业务处理
 Use(handler: ContextHandler): void;

2、Init

 //实现初始化任务
 Init(handler: InitHandler): void;

3、Module

 //加载模块
 /**
  * route:设置模块名称
  * module:设置此模块的的路径 | 引入的模块类
  */
 Module(route: string, module: String | Controller | Function | IController): void;

4、Route

 //模块api路径
 Route(route: string, handler: ContextHandler): void;

5、ResponseAdvice

 //服务返回数据格式处理函数
 ResponseAdvice(handler: ResponseAdvice): void;

6、Port

 //服务端口
 //优先级比listen低,同时设置的话listen覆盖port端口
 Port(port: number): void;