The options
object.
Optional
chrome?: stringChrome executable path.
'/usr/bin/chromium-browser'
Optional
entry?: stringHTML document (relative to prefix
).
'index.html'
Optional
host?: stringHost/IP to bind to.
'127.0.0.1'
Optional
port?: stringPort to bind to.
'4000'
Optional
prefix?: stringUse an alternative working directory.
'./'
An execution Promise.
Run with default options:
require('@sgrud/bin');
sgrud.bin.universal();
Listen on all IPs:
require('@sgrud/bin');
sgrud.bin.universal({
host: '0.0.0.0'
});
Listen on 192.168.0.10:4040
:
require('@sgrud/bin');
sgrud.bin.universal({
host: '192.168.0.10',
port: '4040'
});
Generated using TypeDoc
Runs SGRUD in universal (SSR) mode using puppeteer.