1 ---
2 title: npm-start
3 section: 1
4 description: Start a package
5 github_repo: npm/cli
6 github_branch: release/v8
7 github_path: docs/lib/content/commands/npm-start.md
8 redirect_from:
9 - /cli-documentation/v8/cli-commands/npm-start
10 - /cli-documentation/v8/cli-commands/start
11 - /cli-documentation/v8/commands/npm-start
12 - /cli-documentation/v8/commands/start
13 - /cli-documentation/v8/npm-start
14 - /cli-documentation/v8/start
15 - /cli/v8/cli-commands/npm-start
16 - /cli/v8/cli-commands/start
17 - /cli/v8/commands/start
18 - /cli/v8/npm-start
19 - /cli/v8/start
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm start [-- <args>]
26 ```
27
28 ### Description
29
30 This runs a predefined command specified in the `"start"` property of a package's `"scripts"` object.
31
32 If the `"scripts"` object does not define a `"start"` property, npm will run `node server.js`.
33
34 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 .`
35
36 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/v8/commands/npm-run-script) for more details.
37
38 ### Example
39
40 ```json
41 {
42 "scripts": {
43 "start": "node foo.js"
44 }
45 }
46 ```
47
48 ```bash
49 npm start
50
51 > npm@x.x.x start
52 > node foo.js
53
54 (foo.js output would be here)
55
56 ```
57
58 ### Configuration
59
60 #### `ignore-scripts`
61
62 - Default: false
63 - Type: Boolean
64
65 If true, npm does not run scripts specified in package.json files.
66
67 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.
68
69 #### `script-shell`
70
71 - Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
72 - Type: null or String
73
74 The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <package-spec>` commands.
75
76 ### See Also
77
78 - [npm run-script](/cli/v8/commands/npm-run-script)
79 - [npm scripts](/cli/v8/using-npm/scripts)
80 - [npm test](/cli/v8/commands/npm-test)
81 - [npm restart](/cli/v8/commands/npm-restart)
82 - [npm stop](/cli/v8/commands/npm-stop)