| In the process of software development,the cost of repeated development can be greatly reduced by sharing code,and the effect of software reuse can be achieved.In the age when the package manager has not yet emerged,the sharing of code needs to be realized through website download.When a system depends on more and more codes,this method becomes very cumbersome,and it is not conducive to the update of the dependent code.Therefore,a tool for centralized management of these codes is needed.From this point of view,this paper studies and implements an enterprise-level Node software package manager,or npm for short.This article first investigated the software package management systems currently in use at home and abroad,and established the research goals.Afterwards,according to the software engineering method,the system was analyzed and detailedly designed.The system was divided into six modules: search,software package installation,software package release,authority management,external software package synchronization,and audit.Based on the design and development,the system code is realized.The system adopts the architecture of combining B/S and C/S.The front-end and back-end communicate through HTTP requests.The front-end adopts the React framework to realize the MVVM design pattern,and the back-end uses Node.js and Koa frameworks.Three databases,My SQL,Redis,and object storage,are used to store different data.Finally,the system is tested to ensure that the system achieves the expected goals in terms of function and performance.The system realizes the installation of software packages,release,meta-information management,audit,user authority control and synchronization of external packages,and has been deployed online.The system has stored 1.66 million public packages and 40 thousand private packages,and had a weekly download volume of 30 million.It is an indispensable infrastructure system for Node.js development in the company. |