Missing .env.example file in project
Answered
Basense posted this in #help-forum
BasenseOP
I'm trying to integrate an sql database using the following tutorial:
https://nextjs.org/learn/dashboard-app/setting-up-your-database
about half way scrolled down on the page it says I should rename my .env.example file to .env, but I can't find any file remotely related to that.
I set up the project recently and I can't figure out how to solve this
https://nextjs.org/learn/dashboard-app/setting-up-your-database
about half way scrolled down on the page it says I should rename my .env.example file to .env, but I can't find any file remotely related to that.
I set up the project recently and I can't figure out how to solve this
15 Replies
or perhaps you need to turn on "show hidden files", since files starting with a
.
is hidden by default in unix/-like systemsBasenseOP
I made my own repo using npx create-next-app@latest
oh well then you wouldn't have that file
BasenseOP
how do I add my db to the project then? (I initially made a mariadb which works and would love to integrate that instead of postgre if that is possible)
well the
.env.example
file only serves as an example to how an .env
would look likeBasenseOP
oooh
you could just create an empty
.env
file and work from thereAnswer
BasenseOP
where in the folder structure would it go though? in the src folder or in the project folder itself?
since
.env
could contain sensitive info like tokens or secrets, oss projects can only provide an example on how it would look like through the .env.example
in the root folder
good luck!