CLI framing, creates rooms

This commit is contained in:
David Zhao
2020-11-04 23:29:46 -08:00
parent 9ebfebe2dd
commit 218b9a0277
13 changed files with 264 additions and 61 deletions
+28
View File
@@ -0,0 +1,28 @@
package commands
import (
"encoding/json"
"fmt"
"github.com/urfave/cli/v2"
)
var (
roomFlag = &cli.StringFlag{
Name: "room-id",
Required: true,
}
roomHostFlag = &cli.StringFlag{
Name: "host",
Value: "http://localhost:7880",
}
rtcHostFlag = &cli.StringFlag{
Name: "host",
Value: "ws://localhost:7881",
}
)
func PrintJSON(obj interface{}) {
txt, _ := json.Marshal(obj)
fmt.Println(string(txt))
}