1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

Merge branch 'master' into defaultplugs

This commit is contained in:
Brian Ketelsen
2025-05-15 10:34:27 -04:00

View File

@ -87,10 +87,11 @@ func main() {
}
```
Optionally set fixed address
Set a fixed address
```golang
service := micro.NewService(
micro.Name("helloworld"),
micro.Address(":8080"),
)
```
@ -104,23 +105,3 @@ curl -XPOST \
-d '{"name": "alice"}' \
http://localhost:8080
```
## Micro
Use the [Micro](https://github.com/micro/micro) cli to call it
```
micro call helloworld Say.Hello '{"name": "Asim"}'
```
Run the micro api and call it via http
```
micro api
```
Call it via http://localhost:8080/
```
curl -d '{"name": "Asim"}' https://localhost:8080/helloworld/Say/Hello
```