diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-02-09 17:28:27 -0500 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-02-09 17:28:27 -0500 |
commit | 1eb3d60457d4fc0ae957832c3ab751b54a24cc21 (patch) | |
tree | c027231dfa734dc584735ef5d80e08b0f506b766 /database.tsx | |
parent | 5722979894b53805639407f856cea78a56d725f3 (diff) |
database
Diffstat (limited to 'database.tsx')
-rw-r--r-- | database.tsx | 15 |
1 files changed, 0 insertions, 15 deletions
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(); - }); - } -} |