Env Vars
Dependencies
npm i dotenvThe .env File
.env FilePORT=3000
DB_URL=postgresql://USER:PASSWORD@localhost:5432/scavenger_hunt
SESSION_SECRET=Sooper sekrit phraserequire('dotenv').config()
// ...
const PORT = process.env.PORT
const connectionString = process.env.DB_URL
const pool = new Pool({
connectionString
})
// ...Ignore the .env File
.env FileLast updated