http.createServer -> https.create... to illustrate "multiple addresses" comment (#749)

This commit is contained in:
Jonathan Boiser 2016-06-21 22:02:18 -05:00 committed by jongleberry
parent ea992fc258
commit 99d76d773d

View file

@ -123,9 +123,11 @@ var http = require('http');
var koa = require('koa');
var app = koa();
http.createServer(app.callback()).listen(3000);
http.createServer(app.callback()).listen(3001);
https.createServer(options, app.callback()).listen(3001);
```
Here, `options` is a required argument for Node `https.createServer` containing certificate information. See the [Node documentation](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener) for more details.
## app.callback()
Return a callback function suitable for the `http.createServer()`