Setup MongoDB with Koa.js
I’m building a Koa.js server and need to connect to MongoDB to store and retrieve data. Here is how to do it with some simple steps:
Step 1: Connect the database before Koa app initialised
const initDB = require('./database');
initDB();
const app...
victorleungtw.hashnode.dev2 min read