mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
5d028b72fb
no related issue - Updates package.json packages, adding express middleware packages that have been broken into their own modules - Updates controllers/frontend.js to use the new Layer object that Express 4.0 has. Requires some monkey-patching as the Layer object isn't explicitly surfaced, however it should be safe to do. - Moved the setup of routes into middleware/index.js because they need to be added as a middleware function before the 404 and 500 handlers. This is no longer possible with the old app.use(app.router) as that has been removed. - Cleaned up middleware/index.js to make it compatible with Express 4.0. - Simplified the way themes are activated and enabled when they are activated. The new handling is simpler, yet should still cover all the use cases that previously existed. - The entire flow of activating a theme through middleware should be a little more centralized, letting it be easier to read and maintain. - Moved every routes/*.js file to use an individual express.Router() instance. |
||
---|---|---|
.. | ||
api | ||
apps | ||
config | ||
controllers | ||
data | ||
errors | ||
helpers | ||
middleware | ||
models | ||
permissions | ||
routes | ||
storage | ||
views | ||
api.js | ||
bookshelf-session.js | ||
filters.js | ||
index.js | ||
mail.js | ||
middleware.js | ||
require-tree.js | ||
update-check.js | ||
xmlrpc.js |