Alan Lu
Alan Lu

Reputation: 11

Quotation marks in .env file for Node.js project

I am basically copying and pasting a Fullstack (react/Node.js/Mysql) project from Youtube. And I encountered a strange bug looks nowhere can find an answer According to the video and all sources everywhere, that is the quotation marks in .env file.

Initially I followed the usual way, quotation mark outside a string, and I can not connect to my database:

DB_HOST = "localhost"
DB_USER = "root"

It takes me ages until I tried something like, and it worked:

DB_HOST = localhost
DB_USER = root

I am wondering why this happened? all I found is it does not matter if there is quotation marks in the .env file

Thanks in advance

Upvotes: 1

Views: 50

Answers (0)

Related Questions