Hello, I am trying to connect my app to moralis using express and I put my keys in a .env file in the same folder that I am using to connect and then at the top of my routes I have:
const router = require('express').Router();
const Moralis = require('moralis/node')
const { popularNFTs } = require('../src/collections')
require('dotenv').config();
const serverUrl = process.env.serverUrl
const appId = process.env.appId
then I call later
await Moralis.start({ serverUrl, appId });
My server crashes and I get the error โWeb3Api.initialize failed: initialize with apiKey or serverUrlโ
The app works perfectly if I hard code my .env variables, but obviously I donโt want to do that.