I am trying to get the mongodb collection name from an environment variable defined in .env. It looks like the model is initialised before the .env is read.
@model({
name: 'MyType',
settings: {
mongodb: process.env.COLLECTION_NAME,
},
})
The process.env.COLLECTION_NAME is, at this point, undefined
Any way to externalised the collection name? Many thanks for the help.