nodejs/deps/npm/man/man1/npm-start.1

62 lines
1.1 KiB
Groff
Raw Normal View History

.TH "NPM\-START" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SS Synopsis
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
2014-09-24 14:41:07 -07:00
npm start [\-\- <args>]
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
.SS Description
2014-09-24 14:41:07 -07:00
.P
This runs a predefined command specified in the \fB"start"\fP property of
a package's \fB"scripts"\fP object\.
.P
If the \fB"scripts"\fP object does not define a \fB"start"\fP property, npm
will run \fBnode server\.js\fP\|\.
.P
Note that this is different from the default node behavior of running
the file specified in a package's \fB"main"\fP attribute when evoking with
\fBnode \.\fP
.P
As of \fBnpm@2\.0\.0\fP \fIhttps://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
use custom arguments when executing scripts\. Refer to npm help \fBrun\-script\fP for more details\.
.SS Example
.P
.RS 2
.nf
{
"scripts": {
"start": "node foo\.js"
}
}
.fi
.RE
.P
.RS 2
.nf
npm start
> npm@x\.x\.x start
> node foo\.js
(foo\.js output would be here)
.fi
.RE
.SS See Also
2014-09-24 14:41:07 -07:00
.RS 0
.IP \(bu 2
npm help run\-script
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help scripts
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help test
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help restart
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help stop
2014-09-24 14:41:07 -07:00
.RE