create method Null safety
- {bool logRequest = false}
Starts the _server
.
If logRequest
is true prints the time of the request, the elapsed time for the
inner handlers, the response's status code and the request URI.
Implementation
Future<void> create({
final bool logRequest = false,
}) async {
if (logRequest) {
addMiddleware(logRequests());
}
await _server.start();
print('Server listening on port ${_server.getPort()}');
}