我如何从头开始实现 NPM 兼容的包注册表?

How can i implement an NPM compatible package registry from scratch?

我想实现我自己的 NPM 兼容包注册表,例如 'github packages'。

我在哪里可以找到有关如何完成此操作的文档?


例如;

npm login --registry https://myregistry.com

npm install

都会向注册表发送 post/get 请求。我在哪里可以找到有关如何实现这些端点的文档?这是public信息吗?

npm 注册表的响应文档位于 github:

https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#dist