1NPM-START(1) NPM-START(1)
2
3
4
6 npm-start - Start a package
7
8 Synopsis
9 npm start [-- <args>]
10
11 Description
12 This runs a predefined command specified in the "start" property of a
13 package's "scripts" object.
14
15 If the "scripts" object does not define a "start" property, npm will
16 run node server.js.
17
18 Note that this is different from the default node behavior of running
19 the file specified in a package's "main" attribute when evoking with
20 node .
21
22 As of npm@2.0.0 ⟨https://blog.npmjs.org/post/98131109725/npm-2-0-0⟩,
23 you can use custom arguments when executing scripts. Refer to npm help
24 run-script for more details.
25
26 Example
27 {
28 "scripts": {
29 "start": "node foo.js"
30 }
31 }
32
33 npm start
34
35 > npm@x.x.x start
36 > node foo.js
37
38 (foo.js output would be here)
39
40
41 Configuration
42 ignore-scripts
43 • Default: false
44
45 • Type: Boolean
46
47
48 If true, npm does not run scripts specified in package.json files.
49
50 Note that commands explicitly intended to run a particular script, such
51 as npm start, npm stop, npm restart, npm test, and npm run-script will
52 still run their intended script if ignore-scripts is set, but they will
53 not run any pre- or post-scripts.
54
55 script-shell
56 • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
57
58 • Type: null or String
59
60
61 The shell to use for scripts run with the npm exec, npm run and npm
62 init <package-spec> commands.
63
64 See Also
65 • npm help run-script
66
67 • npm help scripts
68
69 • npm help test
70
71 • npm help restart
72
73 • npm help stop
74
75
76
77 November 2023 NPM-START(1)