Exemple #1
0
func newKVService(port string) *exercise.HttpServer {
	store := kv.NewStore()
	server := exercise.NewHttpServer(port)
	server.AddHandler("/kv/", CrudHandler(store))
	server.AddHandler("/kv/count/", CountHandler(store))
	return server
}
Exemple #2
0
func NewMd5Service(port string) *exercise.HttpServer {
	server := exercise.NewHttpServer(port)
	server.AddHandler("/md5/", Md5Handler())
	return server
}