package main import ( "flag" . "github.com/tendermint/go-common" "github.com/tendermint/tmsp/example/counter" "github.com/tendermint/tmsp/server" ) func main() { addrPtr := flag.String("addr", "tcp://0.0.0.0:46658", "Listen address") tmspPtr := flag.String("tmsp", "socket", "TMSP server: socket | grpc") serialPtr := flag.Bool("serial", false, "Enforce incrementing (serial) txs") flag.Parse() app := counter.NewCounterApplication(*serialPtr) // Start the listener srv, err := server.NewServer(*addrPtr, *tmspPtr, app) if err != nil { Exit(err.Error()) } // Wait forever TrapSignal(func() { // Cleanup srv.Stop() }) }