Example #1
0
func main() {
	transport := browser.NewRestTransport()
	store := editor.NewRestDataStore(transport)
	app := editor.NewMainApplication(store)

	browser.Run(app)
}
Example #2
0
func main() {
	arguments, _ := docopt.Parse(usage(), nil, true, app.Title, false)
	addressArg := arguments["--address"]
	address := "localhost:8080"

	if addressArg != nil {
		address = addressArg.(string)
	}

	deferrer := make(chan func(), 100)
	defer close(deferrer)

	transport := native.NewRestTransport("http://"+address, deferrer)
	store := editor.NewRestDataStore(transport)
	app := editor.NewMainApplication(store)

	console.Run(app, deferrer)
}