pnpm server
已弃用的功能
🌐 Deprecated feature
管理存储服务器。
🌐 Manage a store server.
命令
🌐 Commands
pnpm server start
启动一个执行所有存储交互的服务器。其他命令将把任何与存储相关的任务委托给此服务器。
🌐 Starts a server that performs all interactions with the store. Other commands will delegate any store-related tasks to this server.
pnpm server stop
停止存储服务器。
🌐 Stops the store server.
pnpm server status
打印有关正在运行的服务器的信息。
🌐 Prints information about the running server.
选项
🌐 Options
--background
- 默认:假
- 类型:布尔
在后台运行服务器,类似于 UNIX 系统上的守护进程。
🌐 Runs the server in the background, similar to daemonizing on UNIX systems.
--network-concurrency
- 默认:空
- 类型:数字
同时处理的最大网络请求数。
🌐 The maximum number of network requests to process simultaneously.
--protocol
- 默认:自动
- 类型:自动、TCP、IPC
服务器使用的通信协议。
当设置为 auto 时,除 Windows 外的所有系统都使用 IPC,而 Windows 使用 TCP。
🌐 The communication protocol used by the server.
When this is set to auto, IPC is used on all systems except for Windows,
which uses TCP.
--port
- 默认值:5813
- 类型:端口号
当使用 TCP 进行通信时要使用的端口号。 如果指定了端口并且协议设置为 auto,无论系统类型如何,协议都会自动设置为使用 TCP。
🌐 The port number to use when TCP is used for communication.
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
- 默认:<home>/.pnpm-store
- 类型:路径
用于内容可寻址存储的目录。
🌐 The directory to use for the content addressable store.
--[no-]lock
- 默认:假
- 类型:布尔
设置在服务器运行时是否使包存储对外部进程不可修改。
🌐 Set whether to make the package store immutable to external processes while the server is running or not.
--ignore-stop-requests
- 默认:假
- 类型:布尔
防止你使用 pnpm server stop 停止服务器。
🌐 Prevents you from stopping the server using pnpm server stop.
--ignore-upload-requests
- 默认:假
- 类型:布尔
防止在安装过程中创建新的副作用缓存。
🌐 Prevents creating a new side effect cache during install.