PureCode Software interview question

How do you connect Node.js with different databases (e.g., MongoDB, MySQL)?