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

middware-forward-control

v0.3.7

Published

Next.js middleware relay console: HTTP/Redis sources to Redis list or DingTalk targets, per-node logs. Prebuilt .next in publish; run CLI without building.

Downloads

544

Readme

middware-forward-control

节点配置 源 → 目标 的转发控制台(Next.js)。

  • httpPOST /api/ingest/<路径> + Bearer)、redis(列表 BRPOP
  • 目标redisLPUSH)、dingding(机器人 webhook)

节点日志在 home/logs/channel/node/;进程日志在 home/logs/middware-forward-*.log

启动(生产)

全局安装后:

npm install -g middware-forward-control
middware-forward-control --console-user admin --console-password '你的密码' -p 3847
  • 默认后台运行,打印 PID;标准输出写入 ~/.middware-forward/server.log
  • 运行时与业务数据默认在 ~/.middware-forward .middware-forward.runtime.json + data/ + logs/),不写在 npm 全局包目录,升级包不丢配置。
  • 停止middware-forward-control stop(与启动相同的 MIDDWARE_FORWARD_STATE_DIR / --state-dir)。
  • 前台调试:加 -f / --foreground
  • 自定义状态目录--state-dir /path 或环境变量 MIDDWARE_FORWARD_STATE_DIR

浏览器打开控制台 http://127.0.0.1:3847/console配置中心 配节点。详见 middware-forward-control --help

何时才要配 Redis 相关字段?

仅当该节点启用且源或目标里有一端是 redis 时,该节点必须填 redisUrl(及按需 redisPassword)。HTTP → 钉钉 这类不涉及 Redis 的节点可以不配 Redis。

Redis 列表键为完整 key(如 openclaw:inbound / openclaw:reply);源、目标里不写 listKey 时会用内置默认,与 OpenClaw Redis 通道约定一致。

HTTP 入站

POST /api/ingest/<接入路径>,头 Authorization: Bearer <该节点密钥>请求体全文即转发载荷,无嵌套 envelope。校验通过后返回 200accepted: true),Redis/钉钉转发在进程内异步执行;Redis 列表里存的也是整段 UTF-8 字符串

本地开发

包目录:npm installnpm run dev -- --console-user admin --console-password devtesthttp://127.0.0.1:3847/console。开发模式下状态目录默认为包目录(与 npm run dev 一致)。

注意

--config 里若出现顶层 redisUrl / listKeyPrefix 等,仅用于兼容旧节点迁移,新环境一般不用配。若曾在包目录下有旧 .middware-forward.runtime.json,生产首次启动会自动复制到用户状态目录。