diff options
Diffstat (limited to 'web/models')
| -rw-r--r-- | web/models/mockpoints.js | 16 | ||||
| -rw-r--r-- | web/models/points.js | 11 |
2 files changed, 27 insertions, 0 deletions
diff --git a/web/models/mockpoints.js b/web/models/mockpoints.js new file mode 100644 index 0000000..608c0bd --- /dev/null +++ b/web/models/mockpoints.js @@ -0,0 +1,16 @@ +var mongoose = require('mongoose'); + +var Schema = mongoose.Schema; +var dumbJsonSchema = new Schema({ + type: String, + coordinates: Array +}); + +// Mongoose Model definition +var dumbJson = mongoose.model('dumbJstring', dumbJsonSchema, 'dumbpointscollection'); + +exports.get_dumb_points = function(callback) { + dumbJson.find({}).exec(function(err, docs){ + callback(err, docs) + }); +} 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'); |
