summaryrefslogtreecommitdiffstats
path: root/examples/nodejs-mongodb-mongoose-restify
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nodejs-mongodb-mongoose-restify')
-rw-r--r--examples/nodejs-mongodb-mongoose-restify/package.json4
-rw-r--r--examples/nodejs-mongodb-mongoose-restify/server.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/nodejs-mongodb-mongoose-restify/package.json b/examples/nodejs-mongodb-mongoose-restify/package.json
index 6de9aaf..8aa09a5 100644
--- a/examples/nodejs-mongodb-mongoose-restify/package.json
+++ b/examples/nodejs-mongodb-mongoose-restify/package.json
@@ -4,7 +4,7 @@
"scripts": {
"start": "server.js"
},
- "version": "0.0.0-9",
+ "version": "0.0.0-10",
"engines": {
"node": "0.6.x"
},
@@ -12,4 +12,4 @@
"restify": "1.4.x",
"mongoose": "2.6.x"
}
-}
+} \ No newline at end of file
diff --git a/examples/nodejs-mongodb-mongoose-restify/server.js b/examples/nodejs-mongodb-mongoose-restify/server.js
index ab317de..01a800b 100644
--- a/examples/nodejs-mongodb-mongoose-restify/server.js
+++ b/examples/nodejs-mongodb-mongoose-restify/server.js
@@ -29,7 +29,7 @@ function getMessages(req, res, next) {
// This headers comply with CORS and allow us to server our response to any origin
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
- Message.find().sort('date', -1).execFind(function (arr,data) {
+ Message.find().limit(20).sort('date', -1).execFind(function (arr,data) {
res.send(data);
});
}