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

ENV Example Please! #4

Open
wilfredmanyara opened this issue May 14, 2024 · 12 comments
Open

ENV Example Please! #4

wilfredmanyara opened this issue May 14, 2024 · 12 comments

Comments

@wilfredmanyara
Copy link

Would you mind adding the .env.example file to guide us on all the environment variables used.

@Shreyanshp-3
Copy link

Just Search the Process. on the root file you can get it whereever used

@aayushdhiman01
Copy link

@Shreyanshp-3 hey bro can you tell how to setup this project locally with my own mongoDB account, I am getting some issues in posting data to db ,

@Shreyanshp-3
Copy link

What issues are you getting can you elaborate it more

@aayushdhiman01
Copy link

aayushdhiman01 commented May 24, 2024

@Shreyanshp-3 env file is not being detetced i guess

@Shreyanshp-3
Copy link

whats the error in console?

@aayushdhiman01
Copy link

@Shreyanshp-3 error: Environment variable not found: DATABASE_URL.
--> schema.prisma:13
|
12 | provider = "mongodb"
13 | url = env("DATABASE_URL")

@Shreyanshp-3
Copy link

give the url of your database in .env file or for testing the db just add it in the file itself

@aayushdhiman01
Copy link

aayushdhiman01 commented May 24, 2024

@Shreyanshp-3 ok i started working , i had to run npx prisma db push

@Shreyanshp-3
Copy link

great, search for the error on net or take help of chatgpt copy paste your error you can get some references or way to solve it

@aayushdhiman01
Copy link

@Shreyanshp-3 yeah , thanks for the help :)

@fatima-elfat
Copy link

@Shreyanshp-3 i am getting an error while adding a post, argument user is missing. and some other errors throw new ERR_HTTP_HEADERS_SENT('set');
In api/app.js there is a variable "CLIENT_URL" that you need to add in the .env to allows the sending of headers.
CLIENT_URL= the URL to the client.

@olivodeveloper
Copy link

Hey guys! I believe some of you might have issues adding a .env file to handle Cloudinary keys on the front end, if thats the case, you can use the following variable names for a Vite instance:
VITE_CLOUDINARY_CLOUD_NAME=
VITE_CLOUDINARY_UPLOAD_PRESET=

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

5 participants