Skip to content
Myr

Server#listen() docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 5d37927 · Browse files · 3 files+35 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+35 added−0 removed

  • other:+35 added−0 removed

3 files+35 added−0 removed

modified:docs/guide.1+15 added
702 unmodified lines
703.704.fi705.706.IP "" 0707.708.SS "app\.listen([port[, host]])"709Bind the app server to the given \fIport\fR, which defaults to 3000\. When \fIhost\fR is omitted all connections will be accepted via \fIINADDR_ANY\fR\.710.711.IP "" 4712.713.nf714715app\.listen();716app\.listen(3000);717app\.listen(3000, \'n\.n\.n\.n\');718.719.fi720.721.IP "" 0722
modified:docs/guide.html+11 added
190 unmodified lines
191<li><a href="#app-disable-name-">app.disable()</a></li>192<li><a href="#app-configure-env-function-function-">app.configure()</a></li>193<li><a href="#app-redirect-name-val-">app.redirect()</a></li>194<li><a href="#app-error-function-">app.error()</a></li>195<li><a href="#app-listen-port-host-">app.listen()</a></li>196</ul>197 <a href='http://github.com/visionmedia/express' id='logo'>Express</a> 198 <p id="tagline">199 High performance, high class web development for
479 unmodified lines
679 res.send(err.message, 500);680});681</code></pre>682683<h3 id="app-listen-port-host-">app.listen([port[, host]])</h3>684685<p>Bind the app server to the given <em>port</em>, which defaults to 3000. When <em>host</em> is omitted all686connections will be accepted via <em>INADDR_ANY</em>.</p>687688<pre><code>app.listen();689app.listen(3000);690app.listen(3000, 'n.n.n.n');691</code></pre>692693</div>694 </div>695 </div>696 </body>
1 unmodified line
modified:docs/guide.md+9 added
427 unmodified lines
428429 app.error(function(err, req, res, next){430 res.send(err.message, 500);431 });432433### app.listen([port[, host]])434435Bind the app server to the given _port_, which defaults to 3000. When _host_ is omitted all436connections will be accepted via _INADDR_ANY_.437438 app.listen();439 app.listen(3000);440 app.listen(3000, 'n.n.n.n');