Exemple #1
0
func init() {
	glog.SetToStderr(true)
	cfg := config.ParseConfigFromFile("cayley_appengine.cfg")
	ts := memstore.NewMemTripleStore()
	glog.Errorln(cfg)
	LoadTriplesFromFileInto(ts, cfg.DatabasePath, cfg.LoadSize)
	http.SetupRoutes(ts, cfg)
}
Exemple #2
0
func init() {
	glog.SetToStderr(true)
	cfg := config.ParseConfigFromFile("cayley_appengine.cfg")
	qs, _ := graph.NewQuadStore("memstore", "", nil)
	glog.Errorln(cfg)
	db.Load(qs, cfg, cfg.DatabasePath)
	http.SetupRoutes(qs, cfg)
}
Exemple #3
0
func init() {
	glog.SetToStderr(true)
	cfg, err := configFrom("cayley_appengine.cfg")
	if err != nil {
		glog.Fatalln("Error loading config:", err)
	}

	handle, err := db.Open(cfg)
	if err != nil {
		glog.Fatalln("Error opening database:", err)
	}
	http.SetupRoutes(handle, cfg)
}