addRoute method

Route addRoute(
  1. Route route
)
override

Adds the given route to be served

Implementation

Route addRoute(Route route) {
  if (_servers != null) throw Exception('Server has started!');
  _routes.add(route);
  return route;
}