Nollup Dev Server
May 11, 2022 ยท View on GitHub
The dev server provides a function that when called, will start an ExpressJS web server and the Nollup compiler. It's intended to be used by developers who need to programmatically control when Nollup is started and run additional code around it.
The dev server can be imported into your startup script using the following:
let NollupDevServer = require('nollup/lib/dev-server');
Once imported, you can call it anywhere you want, and it will start compiling and serving:
NollupDevServer({
hot: true,
port: 9001,
...
});
Options
The following options can be passed into Nollup Dev Server. You can find a full description of each of these options here.
Function beforeFunction afterObject|String configString rcBoolean hotNumber portBoolean verboseString headersString hmrHostString hostString contentBaseString publicPathObject proxyBoolean|String historyApiFallbackBoolean httpsString keyString certString|Boolean liveBindingsString|String[] configPlugin
.nolluprc
The dev server supports an external configuration using .nolluprc.