zero-to-one-scripts
v1.0.7
Published
deploy tool for egg project.
Downloads
1
Readme
egg-scripts
deploy tool for egg project.
Install
$ npm i egg-scripts --save
Usage
Add egg-scripts
to package.json
scripts:
{
"scripts": {
"start": "egg-scripts start --daemon",
"stop": "egg-scripts stop"
}
}
Then run as:
npm start
npm stop
Note: egg-scripts
is not recommended to install global, you should install and use it as npm scripts.
Command
start
Start egg at prod mode.
$ egg-scripts start [options] [baseDir]
# Usage
# egg-scripts start --port=7001
# egg-scripts start ./server
- Arguments
baseDir
- directory of application, default toprocess.cwd()
.
- Options
port
- listening port, default toprocess.env.PORT
, if unset, egg will use7001
as default.title
- process title description, use for kill grep, default toegg-server-APPNAME
.workers
- numbers of app workers, default toprocess.env.EGG_WORKERS
, if unset, egg will useos.cpus().length
as default.daemon
- whether run at background daemon mode.framework
- specify framework that can be absolute path or npm package, default to auto detect.env
- egg server env, default toprocess.env.EGG_SERVER_ENV
, recommended to keep empty then use framwork default env.
stop
Stop egg gracefull.
Note: Windows is not supported yet, try to kill master process which command contains start-cluster
or --type=egg-server
yourself, good luck.
# stop egg
$ egg-scripts stop [baseDir]
# egg-scripts stop ./server
- Arguments
baseDir
- directory of application, default toprocess.cwd()
.