
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
node-multi
Advanced tools
基于gulp,管理多个node应用,typescript编译-》压缩-》上传-》服务器脚本。
好处:节省磁盘空间,确保不同项目引用包的版本一致,提高代码复用率
npm i node-multi -g
使用 nodem 命令
nodem init
nodem run
nodem run -m build
nodem run -m batch
npm i node-multi -D
在package.json的script中
"scripts": {
"init": "node_modules/.bin/nodem init",
"dev": "node_modules/.bin/nodem run",
"build": "node_modules/.bin/nodem run -m build",
"batch": "node_modules/.bin/nodem run -m batch"
}
该文件主要包含项目配置/环境配置/全局配置。
"root": "src/projects",
"projects": {
"myproject": { 项目代码,用于唯一标识一个项目
"dir": "项目目录(相对root目录)",
"name": "项目名称",
"entry": "项目启动文件,通常会是server.js或index.js",
"envs": { 环境列表
"prod": { 环境代码,用于唯一标识一个环境
环境配置信息
}
...
}
}
...
}
项目自定义环境配置
"root": "src/projects",
"projects": {
"myproject": {
...
"envs": {
项目自定义环境配置
"prod": { 环境代码
"name": "环境名称",
"dist": "发布文件的目录,相对projects.json所在的目录",
"config": { 该环境自定义配置属性,比如数据库的连接信息
...
},
"pm2": { pm2自动重启的配置
"name": "pm2 list 里应用的名称"
},
"git": { git自动提交代码配置
"url": "仓库的ssh地址"
"branch": "分支名称"
}
}
...
}
}
...
}
全局指定环境配置
"global": {
"env": {
"prod": {
"name": "环境名称",
"dist": "发布文件的目录,相对projects.json所在的目录",
"config": {
...
},
"pm2": {
...
},
"git": {
...
}
},
...
}
}
全局环境配置
"global": {
"env": {
"config": {
...
},
"pm2": {
...
},
"git": {
...
}
...
}
}
FAQs
Manager multiple node application & deploy
We found that node-multi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.