@bitfinex/bfx-svc-boot-js

中文文档
2.0.0发布于 2026/11/05Apache-2.0CommonJS近 30 天下载 1.3万

Svc-js的工人CLI

中文使用文档

bfx-svc-boot-js (英语)

用来产出a bfx-svc-js 服务。 包含工人的CLI.

参数 :

wtype         worker name, e.g. wrk-util-net-api
env           production or development
debug         enable debug mode, with heap dump support

For workers that require a port:

apiPort       port to listen on, e.g. 8721

堆积堆积

内存快照可以在克罗姆装入. 打开开发工具,到 Memory 选项卡,单击: Load profile...。您可以装入多个快照并播放它们.

要启用内存快照支持, 请以 --debug 旗帜.

每次进程收到时都会写出快照 SIGUSR2 信号.

$ kill -USR2 <pid>

示例

# start service with heap dump support
$ node worker.js --env=development --wtype=wrk-util-net-api --apiPort 8721 --debug=true

# do some operations, e.g. multiple requests

# then take first snapshot
$ ps -A | grep util-net-api
70833 ttys001    0:01.23 wrk-util-net-api-70833

$ kill -USR2 70833

# heapdump-258886655.138372.heapsnapshot file appears in service dir

# repeat sending signal if you want to compare snapshots

版本与发布记录

@bitfinex/bfx-svc-boot-js 共发布 5 个版本,首次发布于 2026/01/30;过去 12 个月发布了 5 个版本。

版本发布日期距今
2.0.0latest2026/11/052 天前
1.3.12026/06/164 个月前
1.3.02026/05/295 个月前
1.2.02026/04/186 个月前
1.1.02026/01/309 个月前

关于 @bitfinex/bfx-svc-boot-js 的常见问题

@bitfinex/bfx-svc-boot-js 是什么?

Svc-js的工人CLI

如何安装 @bitfinex/bfx-svc-boot-js?

在项目目录运行 npm install @bitfinex/bfx-svc-boot-js,或使用 pnpm add / yarn add / bun add。

@bitfinex/bfx-svc-boot-js 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bitfinex__bfx-svc-boot-js 是否存在。

@bitfinex/bfx-svc-boot-js 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bitfinex/bfx-svc-boot-js 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bitfinex/bfx-svc-boot-js 可以商用吗?

@bitfinex/bfx-svc-boot-js 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@bitfinex/bfx-svc-boot-js 的下载量有多少?

根据 npm 官方下载统计,@bitfinex/bfx-svc-boot-js 在 2026/10/08 – 2026/11/06 这 30 天内被下载 13,421 次,日均约 447 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bitfinex/bfx-svc-boot-js 还在维护吗?

最新版本 2.0.0 发布于 2026/11/05(2 天前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/01/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。