Last active
December 21, 2015 15:49
-
-
Save jkeskikangas/6328802 to your computer and use it in GitHub Desktop.
Revisions
-
Jarno Keskikangas revised this gist
Aug 24, 2013 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ search: ({query: {q}}, res) => @collection.then((coll) -> coll.find(key: new RegExp(q, 'i')) .sort(_id: -1) .limit(20) .stream() .pipe(JSONStream.stringify()) .pipe(res)) .done() -
Jarno Keskikangas revised this gist
Aug 24, 2013 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ search: ({query: {q}}, res) => @collection.then((coll) -> coll .find(key: new RegExp(q, 'i')) .sort(_id: -1) .limit(20) .stream() .pipe(JSONStream.stringify()) .pipe(res)) .done() -
Jarno Keskikangas revised this gist
Aug 24, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ search: ({query: {q}}, res) => @collection.then((coll) -> coll.find(key: new RegExp(q, 'i')) .sort(_id: -1) .limit(20) .stream() .pipe(JSONStream.stringify()) .pipe(res)) .done() -
Jarno Keskikangas created this gist
Aug 24, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ search: ({query: {q}}, res) => @collection.then((coll) -> coll.find(key: new RegExp(q, 'i')) .sort(_id: -1) .limit(20) .stream() .pipe(JSONStream.stringify()) .pipe(res)) .done()