aboutsummaryrefslogtreecommitdiff
path: root/web/models/points.js
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 07:40:15 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 07:40:15 +0000
commit0a61d18ba0088b378fcfab6498b3a1c42f9c029f (patch)
tree2dc863825deba71b4e683619705f02a8d685967f /web/models/points.js
parent197f2f42091b691feb7c31308dbfc9ddde07a10f (diff)
sending geo data to front end, displaying it as markers, and taken out schema defs from index into models folder
Diffstat (limited to 'web/models/points.js')
-rw-r--r--web/models/points.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/models/points.js b/web/models/points.js
new file mode 100644
index 0000000..18ffe2e
--- /dev/null
+++ b/web/models/points.js
@@ -0,0 +1,11 @@
+var mongoose = require('mongoose');
+
+// Mongoose Schema definition
+var Schema = mongoose.Schema;
+var JsonSchema = new Schema({
+ type: String,
+ coordinates: Array
+});
+
+// Mongoose Model definition
+var Json = mongoose.model('Jstring', JsonSchema, 'pointscollection');