0.0.21 • Published 4 years ago

@zpmc/zwd-server v0.0.21

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

npm server + fe server

依赖第三方模块 cnpmjs.org / http-server / http-proxy / ftp-srv / pm2 / sqlite3 实现前端 私有NPM仓库,API文档服务器,技术文档服务器,静态资源托管 等功能。

通过 http-proxy 进行方向代理,实现统一80端口跳转不同服务;

通过 cnpmjs.org 搭建私有NPM服务器,并进行个性化定制,比如个性化WEB端视图,基本配置,日志打印等;

通过 http-server 搭建静态服务器;

通过 ftp-srv 搭建FTP服务器;

通过 pm2 对启动服务进程进行管理;

搭建服务器:

第一步: 安装 git
第二步: 安装 nodejs 10+ 尽可能使用最新稳定版本
第三步: 安装 npm 全局依赖
// 配置淘宝镜像
npm config set registry http://registry.npm.taobao.org/

// cnpm
npm install cnpm -g

// 静态服务器
npm install http-server -g 

// 进程管理
npm install pm2 -g
第四步: 安装 @zpmc/npm-server
// 克隆 npm-server
git clone http://10.28.251.61:8080/tfs/%E6%99%BA%E8%83%BD%E8%BD%AF%E4%BB%B6%E5%85%AC%E5%8F%B8/zpmc_fe/_git/npm-server

cd npm-server

npm install / cnpm install

npm run start [all|http|npm|static|apis|ftp] // 启动服务
npm run stop [all|http|npm|static|apis|ftp] // 停止服务
npm run show [http|npm|static|apis|ftp] 查看服务详细状态
npm run list 查看所有服务状态
npm run logs 查看日志

启动 showdoc

sh npm-server/bin/showdoc start // 开启
sh npm-server/bin/showdoc restart // 重启
sh npm-server/bin/showdoc stop // 停止

客户端:

  1. 配置 host
10.128.254.56 fe.zpmc.com
10.128.254.56 apis.fe.zpmc.com
10.128.254.56 npm.zpmc.com
10.128.254.56 publish.npm.zpmc.com
  1. 常用链接,建议加入浏览器收藏夹

    前端文档:http://fe.zpmc.com

    前端API:http://apis.fe.zpmc.com

    前端NPM:http://npm.zpmc.com

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.19-beta.1

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.10

4 years ago

0.0.9-beta.6

4 years ago

0.0.9

4 years ago

0.0.9-beta.5

4 years ago

0.0.9-beta.4

4 years ago

0.0.9-beta.3

4 years ago

0.0.9-beta.2

4 years ago

0.0.9-beta.1

4 years ago

0.0.1

4 years ago

0.0.1-beta.2

4 years ago

0.0.1-beta.1

4 years ago