Make sure to create a database in MongoDB and create a database username (who will have read-write permissions in the database) to connect successfully to your DB, during runtime execution.