my app works perfect on development conneting to the mongodb atlas, but when trying to deploy I get an error. After isolation Testing I found out that what's causing the crash is the following line:
imports:[MongooseModule.forFeature([{name:Transaction.name,schema:TransactionSchema}])]. Its not happening on a spesific module its for every module I import the Mongoose module.
Again on development it works fine only on production it fail to deploy. The enviorment variables are set correctly on production and the connection is in the app module:
MongooseModule.forRoot(mongodb+srv://${process.env.MONGO_USER}:${process.env.MONGO_PASSWORD}${process.env.MONGO_PATH},{dbName: process.env.DB_NAME}),
Top comments (0)