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