startServer function
Bind the Shelf handler on host:port. Returns the live HttpServer
so the caller (the serve command) can keep the process alive.
Implementation
Future<HttpServer> startServer({
required String projectRoot,
String host = 'localhost',
int port = 4077,
}) async {
final handler = buildHandler(projectRoot);
return shelf_io.serve(handler, host, port);
}