code: func NewServer(network *Network) *Server {
  	s := &Server{
  		router:  httprouter.New(),
  		network: network,
  	}
  
  	s.OPTIONS("/", s.Options)
  	s.GET("/", s.GetNetwork)
  	s.POST("/start", s.StartNetwork)
  	s.POST("/stop", s.StopNetwork)
  	s.POST("/mocker/start", s.StartMocker)
  	s.POST("/mocker/stop", s.StopMocker)
  	s.GET("/mocker", s.GetMockers)
  	s.POST("/reset", s.ResetNetwork)
  	s.GET("/events", s.StreamNetworkEvents)
  	s.GET("/snapshot", s.CreateSnapshot)
  	s.POST("/snapshot", s.LoadSnapshot)
  	s.POST("/nodes", s.CreateNode)
  	s.GET("/nodes", s.GetNodes)
  	s.GET("/nodes/:nodeid", s.GetNode)
  	s.POST("/nodes/:nodeid/start", s.StartNode)
  	s.POST("/nodes/:nodeid/stop", s.StopNode)
  	s.POST("/nodes/:nodeid/conn/:peerid", s.ConnectNode)
  	s.DELETE("/nodes/:nodeid/conn/:peerid", s.DisconnectNode)
  	s.GET("/nodes/:nodeid/rpc", s.NodeRPC)
  
  	return s
  }
docs: // NewServer returns a new simulation API server