Skip to content

Instantly share code, notes, and snippets.

View IronCore864's full-sized avatar
:octocat:
*

Tiexin Guo IronCore864

:octocat:
*
View GitHub Profile
//@flow
import MongoClient from 'mongodb';
import { dbUrl, dbName } from '../config/dbconfig';
async function clean(req: Object, reply: Object): Object {
const collections = ['posts', 'boards', 'users', 'comments'];
for (let collection of collections) {
let client;