{ "scripts": { "dev": "egg-bin dev", "test-local": "egg-bin test", "test": "npm run lint -- --fix && npm run test-local", "cov": "egg-bin cov", "lint": "eslint .", "ci": "npm run lint && npm run cov" }}
Command
All the commands support these specific options:
--inspect
--inspect-brk
--typescript / --ts enable typescript support. Auto detect from package.json's pkg.egg.typescript,
or pkg.dependencies.typescript/pkg.devDependencies.typescript.
--base / --baseDir application's root path, default to process.cwd().
--require will add to execArgv, support multiple. Also support read from package.json's pkg.egg.require
--dry-run / -d whether dry-run the test command, just show the command
Start dev cluster on local env, it will start a master, an agent and a worker.
egg-bin dev
dev options
--framework egg web framework root path.
--port server port. If not specified, the port is obtained in the following order: egg.js configurationconfig/config.*.js > process.env.EGG_BIN_DEFAULT_PORT > 7001 > other available ports.
--workers worker process number, default to 1 worker at local mode.
--sticky start a sticky cluster server, default to false.