// Init sets up the environment and returns the root context
Init sets up the environment and returns the root context
// Init sets up the environment and returns the root context
func Init () (context.Context, func()) {
	ctx, cancel = context.WithCancel(context.Background())
	if os.Getenv("APP_ENV") == "production" {
		Config.Env = "production"
		Config.Listen = ":" + os.Getenv("PORT")
		Config.ConnectionString = os.Getenv("DATABASE_URL")
		Config.ServerOrigin = "https://plotocrat.com"
	} else {
		Config.Env = "development"
		Config.Listen = "localhost:" + os.Getenv("PORT")
		Config.ConnectionString = "postgres://plotocrat:plotocrat@localhost:5432/plotocrat"
		Config.ServerOrigin = "http://localhost:3000"
	}
	return ctx, cancel
}
func Init ( ) ( context . Context , func ( ) ) { ctx , cancel = context . WithCancel ( context . Background ( ) ) if os . Getenv ( " " ) == " " { Config . Env = " " Config . Listen = " " + os . Getenv ( " " ) Config . ConnectionString = os . Getenv ( " " ) Config . ServerOrigin = " " } else { Config . Env = " " Config . Listen = " " + os . Getenv ( " " ) Config . ConnectionString = " " Config . ServerOrigin = " " } return ctx , cancel }
Init sets up the environment and returns the root context
Init sets up the environment and returns the root context