Add readme gif animation showcase for iriscontrol plugin

This commit is contained in:
Makis Maropoulos 2016-06-17 18:02:00 +03:00
parent f21faa7cfd
commit 80963cffe5

View File

@ -0,0 +1,38 @@
## Package information
Iris control is a plugin which gives you a little control over your Iris station.
```go
iris.Plugins.Add(iriscontrol.New(PORT, AUTHENTICATED_USERS))
```
```go
package main
import (
"github.com/kataras/iris"
"github.com/kataras/iris/plugin/iriscontrol"
)
func main() {
iris.Plugins.Add(iriscontrol.New(9090, map[string]string{
"1": "1",
"irisusername2": "irispassowrd2",
}))
iris.Get("/", func(ctx *iris.Context) {
ctx.Write("Root path from server")
})
iris.Get("/something", func(ctx *iris.Context) {
ctx.Write("Something path from server")
})
// Iris control will listen on mydomain.com:9090
iris.Listen("mydomain.com:8080")
}
```
[![Iris control show case](https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/iriscontrolplugin.gif](https://github.com/iris-contrib/examples/tree/master/plugin_iriscontrol)