func init() { if initialized == false { var err error config, err := utils.ReadConfig() if err != nil { log.Fatal("Could not read config.json, check whether it's there") } // Start the DB // fmt.Println(config.Repository.Path,config.Database.DBPath) cmdimpl.CreateRepository(config.Repository.Path, config.Database.DBPath) cmdimpl.StartPG(config.Repository.Path, config.Database.DBPath) cmdimpl.SetupDB() // Start the Node Window //startNW(config.NW.NWPath) initialized = true } }
func GetConfig() (utils.Config, error) { return utils.ReadConfig() }