Shopping Cart Class
")==:errorKV.Registry.create(registry,"shopping")assert{:ok,bucket}=KV.Registry.lookup(registry,"shopping
我们来写一个新的注册表测试: test"removesbucketoncrash",%{registry:registry}doKV.Registry.create(registry,"shopping
##Examplesiex>KVServer.Command.parse"CREATEshopping\r\n"{:ok,{:create,"shopping"}}"""defparse(_line)do
在第一章中,我们指定了我们想要命名每个存储桶,以便我们可以执行以下操作: CREATEshoppingOKPUTshoppingmilk1OKGETshoppingmilk1OK 在上面的会话中,我们与“shopping
让我们来尝试一下iex-Smix: iex>KV.Supervisor.start_link([]){:ok,#PID<0.66.0>}iex>KV.Registry.create(KV.Registry,"shopping
php// A basic shopping cart which contains a list of added products// and the quantity of each product
ShoppingCart 运行ShoppingCart示例: gitclonehttps://github.com/reactjs/redux.gitcdredux/examples/shopping-cartnpminstallnpmstartopenhttp