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

ming_api_mock

v1.0.1

Published

# 介绍

Readme

ming_api_mock

介绍

ming_api_mock 是基于ming_node 实现的一个快速mock 接口的工具

安装使用

方式0

npx ming_api_mock 9999

方式1

下载 ming_api_mock.zip 解压 将解压后的目录加到环境变量PATH中,在拥有服务文件的目录

windows

如果要执行远程插件需要安装curl

https://curl.se/windows/

参数格式

mock [serverJsUrl] [port]

默认8888端口启动

mock

指定8888端口启动

mock 8888

指定远程插件启动

mock https://gitee.com/minglie/ming_api_mock/raw/master/plugins/postman_server_generate/server.js

指定远程插件与端口启动

mock https://gitee.com/minglie/ming_api_mock/raw/master/plugins/postman_server_generate/server.js 8888

类linux与windows类似

参数格式

bash mock.sh [serverJsUrl] [port]

访问 http://localhost:8888 进行接口编写

方式2

在有服务文件的目录执行

curl https://minglie.gitee.io/mi/i4.js > ming_api_mock.js && node ming_api_mock.js

以后启动只需执行下面脚本即可

node ming_api_mock.js [服务目录] [port]

方式3

docker启动

docker run -it -p:8888:8888  registry.cn-hangzhou.aliyuncs.com/minglie1/ming_api_mock:1.0

服务文件格式参考 ming_node

app.get("/a", (req, res) => {
    console.log(req.params)
    M.add({ s: 77 })
    res.send("https://c-t.work/s/7b10cb04d2754c");
})

app.begin((req,res)=>{console.log("req ",req.url)})

使用文档

https://www.yuque.com/docs/share/fc8547e1-e815-4e50-817c-4829e3c76442?#

api_mock对ming_node的扩展

https://www.yuque.com/docs/share/3c03c64c-4f1d-4144-9f60-5fd82b75a0b0?# 《api_mock扩展ming_node》