honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
18.25k stars 515 forks source link

Issue: dotenv configaration problem #2919

Closed imran1khan closed 2 months ago

imran1khan commented 3 months ago

i use donenv for configaration like below

Screenshot 2024-06-06 145016

but i am fasing this issue below

Screenshot 2024-06-06 145304

how can i configure env files using dotenv pleases someone help

MathurAditya724 commented 3 months ago

Cloudflare will load env variables automatically when you start the server. You don't need dotenv package.

EdamAme-x commented 2 months ago

@imran1khan resolved?

imran1khan commented 2 months ago

@MathurAditya724 then where should i supposed to put my env vars

imran1khan commented 2 months ago

@EdamAme-x bro have you found any update, on my side i am still haveing the same issue,

MathurAditya724 commented 2 months ago

You can place your env variables in the .env file and then access it from the context variable. The runtime will automatically load the file so you can remove the dotenv import.

imran1khan commented 2 months ago

@MathurAditya724 bro, look at this Hono docs i gess this should work, please check it, if it works then i am going to close this issue.

MathurAditya724 commented 2 months ago

Yes, it should