aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-03-02 17:43:55 -0500
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-03-02 17:43:55 -0500
commit950c656d06d7c6b25b82030feaa7c5c70102fe6a (patch)
treef5ff6112a6d0c34c225479e94a85450559b3f769 /src/server/index.ts
parentbf26137803c09807b6e7e3d9d9ad086a7ead32ac (diff)
parentbde8aabad7e5745b4797e73b564e4efb19faeca9 (diff)
Merge with master and initial pass at converting main to a component
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 5115142b8..e6f08bc29 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -35,6 +35,12 @@ const mongoose = require('mongoose');
import { performance } from 'perf_hooks'
import * as path from 'path'
import User, { DashUserModel } from './authentication/models/user_model';
+import * as fs from 'fs';
+import * as request from 'request'
+
+const download = (url: string, dest: fs.PathLike) => {
+ request.get(url).pipe(fs.createWriteStream(dest));
+}
const mongoUrl = 'mongodb://localhost:27017/Dash';
mongoose.connect(mongoUrl)