mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-24 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()
|
||||
server := api.NewAPI(gbot)
|
||||
server.Port = "4000"
|
||||
server.Username = "Gort"
|
||||
server.Password = "klaatu"
|
||||
server.AddHandler(api.BasicAuth("gort", "klatuu"))
|
||||
server.Start()
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user