mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
parent
dc183d7a78
commit
a3bf957100
@ -168,8 +168,7 @@ You can also specify the api host and port, and turn on authentication:
|
|||||||
gbot := gobot.NewGobot()
|
gbot := gobot.NewGobot()
|
||||||
server := api.NewAPI(gbot)
|
server := api.NewAPI(gbot)
|
||||||
server.Port = "4000"
|
server.Port = "4000"
|
||||||
server.Username = "Gort"
|
server.AddHandler(api.BasicAuth("gort", "klatuu"))
|
||||||
server.Password = "klaatu"
|
|
||||||
server.Start()
|
server.Start()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user