I just signed up for glitch. It is not recognizing env variables. i added to ,env file. package.json has a “start” script. and also has engine script. I dont know if are those enough for the app to start or is there anything else i gotta do? I could not find a document to read about how to deploy node.js app.
If you started with the Express project then your project should have everything ready. To use .env you gotta install a package called dotenv to expose them so you can use it
hi. thank you for the answer. dotenv is already package.json in dependencies. isnt it supposed to be installed automatically? i am still figuring out how to install npm package through the platform. i am getting this error:
.env: line 6: DSAJFADSLFHDSJ: command not found
Hi yilmazbingo, welcome.
Have you put spaces between keys and values in your env file by mistake? They are run as shell commands so they need to be like:
I set up env variables correctly.
how can I install dotenv from the platform. Also on the console, I am getting favicon request. Do I have to set a favicon when I deploy my app?
No. Web browsers request a favicon. It is not needed. But you can if you want.