Ghost/core/server/routes/frontend.js
Sebastian Gierlinger 078f464197 remove ghost.settings and ghost.notifications
covers 90% of #755
- moved ghost.settings to api.settings
- moved ghost.notifications to api.notifications
- split up api/index.js to notifications.js, posts.js, settings.js,
tags.js and users.js
- added instance.globals as temp workaround for blogglobals (Known
issue: blog title and blog description are updated after restart only)
- added webroot to config() to remove `var root = ...`
- changed `e` and `url` helper to async
- updated tests
2013-12-06 09:51:35 +01:00

15 lines
531 B
JavaScript

var frontend = require('../controllers/frontend'),
api = require('../api');
module.exports = function (server) {
// ### Frontend routes
/* TODO: dynamic routing, homepage generator, filters ETC ETC */
server.get('/rss/', frontend.rss);
server.get('/rss/:page/', frontend.rss);
server.get('/page/:page/', frontend.homepage);
server.get('/', frontend.homepage);
api.settings.read('permalinks').then(function (permalinks) {
server.get(permalinks.value, frontend.single);
});
};