micro 试用

micro 是一个完整的cloud native 开发平台,以下是一个简单的试用

安装

go get github.com/micro/micro/v3

准备环境

主要是server 启动以及环境配置&&登陆

micro server
micro env set local
micro login

创建服务

# generate a service (follow instructions in output)
micro new helloworld
# run the service
micro run helloworld
# check the status
micro status
# list running services
micro services
# call the service
micro helloworld --name=Alice
# curl via the api
curl -d '{"name": "Alice"}' http://localhost:8080/helloworld

效果

 

 


 

 


 

 

说明

micro 提供的能力还是比较强大的,还是值得学习的

参考资料

https://micro.mu/getting-started
https://github.com/micro/micro

posted on 2020-12-27 19:01  荣锋亮  阅读(414)  评论(0编辑  收藏  举报

导航