Server constructor
Server({
- int numberOfPipelines = 1,
Constructor
Creates a new Server with pipelines that do not automatically have rules created from annotations.
Annotations are much more easier to use, so use serverFromAnnotations
instead, when possible.
After creation, a typical application should:
- change the bindPort;
- optionally change the bindAddress (when not deployed with a reverse proxy);
- optionally create and configure additional pipelines;
- optionally manually register request handlers on the pipelines;
- define a server-level exceptionHandler;
and then invoke the run method to start the Web server.
Implementation
Server({int numberOfPipelines = 1}) {
for (var x = 0; x < numberOfPipelines; x++) {
pipelines.add(ServerPipeline());
}
}