-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.go
26 lines (21 loc) · 810 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
import (
"flag"
"github.com/cgrates/cgradmin/admin"
"github.com/zenazn/goji"
)
var (
version = flag.Bool("version", false, "Prints the application version.")
verbose = flag.Bool("verbose", false, "Show extra info about command execution.")
server = flag.String("server", "127.0.0.1:2012", "server address host:port")
//rpcEncoding = flag.String("rpc_encoding", "json", "RPC encoding used <gob|json>")
username = flag.String("user", "root", "Admin username for the webapp")
password = flag.String("pass", "testus", "Admin password for the webapp")
redisCon = flag.String("redis", "127.0.0.1:6379", "redis server address")
)
func main() {
flag.Parse()
admin.Start(admin.NewCGRConnector("json", *server, *redisCon), *username, *password)
flag.Set("bind", ":8080")
goji.Serve()
}