feed -> news; - api/
This commit is contained in:
1 parent
22edc3b275
commit
02906582ac
5 files changed
+7
-7
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var route = require("koa-route");
|
||||
var db = require("../core/db");
|
||||
|
||||
module.exports = function (app) {
|
||||
app.use(route.get("/news", function *(){
|
||||
this.body = yield db.c("posts").find().toArray();
|
||||
}));
|
||||
};
|
||||
Reference in new issue
Block a user