No .env file found
Closed this issue · 2 comments
Hi, I'm an iOS developer so I could not configure the back-end branch. so can you help me for a brief description about how to configure "Go" and MongoDB cluster database,
I got this type of error when config DB_URL inside "config.go"
2020/08/25 13:12:55 No .env file found
2020/08/25 13:12:55 No .env file found
2020/08/25 13:12:55 Database URI does not exist.
how to fix this?
Thanks in advance
Hello @learnSwift92, so the .env file is a private file for keeping your environment variables safe, I put it in the gitignore for this reason. But to get it working, you will need to create a .env file in the "windmill-backend" directory, and include these 4 lines, but swap in your own URLs / variables:
DB_URI=mongodb://localhost:27017/myproject (this could be the uri for a local instance or MongoDB Atlas)
AWS_S3_BASE=https://myproject.s3.us-east-2.amazonaws.com/users/
AWS_S3_REGION=us-east-2
AWS_S3_BUCKET=my-project
As you can see you will also need to create an Amazon S3 instance, and include the URL and variables for that as well. To get started, just type "touch .env" in the terminal inside the windmill-backend directory. I will also update the README to help explain this process a little better.
If you have any further questions let me know!