← 返回命令列表

Linux command

npm-start 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Run start script

npm start

Start with arguments

npm start -- [args]

Start in silent mode

npm start --silent

说明

npm start runs the "start" script defined in package.json. If no start script is defined, it defaults to "node server.js". This is a shorthand for "npm run start" and is commonly used to launch applications.

参数

--
Pass arguments to script.
--silent
Reduce output.
--ignore-scripts
Don't run scripts.
-w, --workspace _name_
Run start script for a specific workspace.
--workspaces
Run start script in all configured workspaces.

FAQ

What is the npm-start command used for?

npm start runs the "start" script defined in package.json. If no start script is defined, it defaults to "node server.js". This is a shorthand for "npm run start" and is commonly used to launch applications.

How do I run a basic npm-start example?

Run `npm start` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -- do in npm-start?

Pass arguments to script.