File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
lib/node_modules/@stdlib/net/disposable-http-server Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,20 @@ var opts = {
47
47
httpServer ( opts );
48
48
```
49
49
50
+ The function supports the following parameters:
51
+
52
+ - ** options** : function options.
53
+ - ** clbk** : callback to invoke upon creating a server (_ optional_ ).
54
+
50
55
The function accepts the following options:
51
56
52
- - ** html** : ` buffer ` or ` string ` to serve as HTML content.
53
- - ** javascript** : ` buffer ` or ` string ` to serve as JavaScript.
57
+ - ** html** : Buffer or string to serve as HTML content.
58
+ - ** javascript** : Buffer or string to serve as JavaScript.
54
59
- ** port** : server port. Default: ` 0 ` (i.e., randomly assigned).
55
60
- ** maxport** : max server port (used when port hunting). Default: ` =port ` .
56
61
- ** hostname** : server hostname.
57
62
- ** address** : server address. Default: ` "0.0.0.0" ` .
58
- - ** open** : ` boolean ` indicating whether to launch a web browser. Default: ` false ` .
63
+ - ** open** : boolean indicating whether to launch a web browser. Default: ` false ` .
59
64
60
65
To serve HTML content, set the ` html ` option. Once the content is requested, the server will close.
61
66
@@ -127,7 +132,7 @@ httpServer( opts, onReady );
127
132
128
133
## Notes
129
134
130
- - If neither the ` html ` or ` javascript ` option is set, the server serves an HTML boilerplate and then closes.
135
+ - If neither the ` html ` nor ` javascript ` option is set, the server serves an HTML boilerplate and then closes.
131
136
132
137
</section >
133
138
You can’t perform that action at this time.
0 commit comments