Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation: Running on Production #141

Open
maen08 opened this issue Sep 3, 2024 · 0 comments
Open

Update documentation: Running on Production #141

maen08 opened this issue Sep 3, 2024 · 0 comments

Comments

@maen08
Copy link

maen08 commented Sep 3, 2024

Hi there,
Please add a section in the readme file/documentation which explains on how to run this project on production. In the codebase i see there are env. to be configured when running on production eg. enabling CORS when running on production

Eg. File /server/web/app.go 

func main() {
	client, err := mongo.Connect(context.TODO(), clientOptions())
	if err != nil {
		log.Fatal(err)
	}
	defer client.Disconnect(context.TODO())
	mongoDB := db.NewMongo(client)
	// CORS is enabled only in prod profile
	cors := os.Getenv("profile") == "prod"
	app := web.NewApp(mongoDB, cors)
	err = app.Serve()
	log.Println("Error", err)
}

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant