diff options
author | Thomas Davis <thomasalwyndavis@gmail.com> | 2012-04-27 00:57:05 +1000 |
---|---|---|
committer | Thomas Davis <thomasalwyndavis@gmail.com> | 2012-04-27 00:57:05 +1000 |
commit | c5df8d09946a24fb1789b6996e102ae8e3d6d340 (patch) | |
tree | 5f34f7b3ef6c0b85b02de8e04e82570bd9802b58 /examples/nodejs-mongodb-mongoose-restify | |
parent | 0c036e043db435a7142b44aefb9cd0bd33060160 (diff) | |
download | backbonetutorials-c5df8d09946a24fb1789b6996e102ae8e3d6d340.zip backbonetutorials-c5df8d09946a24fb1789b6996e102ae8e3d6d340.tar.gz backbonetutorials-c5df8d09946a24fb1789b6996e102ae8e3d6d340.tar.bz2 |
limited results to 20
Diffstat (limited to 'examples/nodejs-mongodb-mongoose-restify')
-rw-r--r-- | examples/nodejs-mongodb-mongoose-restify/package.json | 4 | ||||
-rw-r--r-- | examples/nodejs-mongodb-mongoose-restify/server.js | 2 |
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); }); } |