From 1eb3d60457d4fc0ae957832c3ab751b54a24cc21 Mon Sep 17 00:00:00 2001 From: ab Date: Sat, 9 Feb 2019 17:28:27 -0500 Subject: database --- database.tsx | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 database.tsx (limited to 'database.tsx') diff --git a/database.tsx b/database.tsx deleted file mode 100644 index 9c90326a5..000000000 --- a/database.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { action, configure } from 'mobx'; -import * as mongodb from 'mongodb'; - -export class database { - private MongoClient = mongodb.MongoClient; - private url = 'mongodb://localhost:27017/website'; - - public async update(id: string, field: string, value: string) { - this.MongoClient.connect(this.url, (err, db) => { - let collection = db.collection('documents'); - collection.update({ "id": id }, { $set: { field: value } }); - db.close(); - }); - } -} -- cgit v1.2.3-70-g09d2