pnpm server
警告
Deprecated feature
管理一个 store 服务器。
命令行
pnpm server start
启动一个服务器(server)来执行与 store
之间的所有交互。
其他命令会将任何与 store
相关的任务委托给该服务器。
pnpm server stop
关闭 store
服务器。
pnpm server status
打印运行中的服务器的相关信息。
配置项
--background
- Default: false
- Type: Boolean
在后台运行服务器,类似于 UNIX 系统上的守护进程。
--network-concurrency
- Default: null
- Type: Number
同时处理的最大网络请求数。
--protocol
- Default: auto
- Type: auto, tcp, ipc
服务器使用的通信协议。
When this is set to auto
, IPC is used on all systems except for Windows,
which uses TCP.
--port
- Default: 5813
- Type: port number
使用 TCP 进行通信时使用的端口号。
If a port is specified and the protocol is set to auto
, regardless of system
type, the protocol is automatically set to use TCP.
--store-dir
- Default: <home>/.pnpm-store
- Type: Path
用于内容可寻址存储的目录。
--[no-]lock
- Default: false
- Type: Boolean
设置是否使 package store 对外部进程不可变,无论服务器是否运行。
--ignore-stop-requests
- Default: false
- Type: Boolean
Prevents you from stopping the server using pnpm server stop
.
--ignore-upload-requests
- Default: false
- Type: Boolean
防止在安装期间创建新的副作用缓存。