UnhandledPromiseRejectionWarning: MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string. code example
Example: unhandledpromiserejectionwarning: mongooseerror: the `uri` parameter to `openuri()` must be a string, got "undefined".
I think you miss importing env file.
require('dotenv').config({ path: 'ENV_FILENAME' });