Ghost/core/test/unit/middleware
Hannah Wolfe 61bf54ec88 🎉 Middleware refactor: Give the API its own express App (#7537)
refs #4172

* 🎨 Use bodyParser only where it is needed

This is a pretty extreme optimisation, however in the interests of killing middleware/index.js it
seemed prudent to move towards not having in there that wasn't strictly necessary 😁

We should reassess how apps do this sort of thing, but it seems pretty sane to declare bodyParsing
if and only if it is necessary.

* 🎨 Move all API code to API router

* 🎨 Refactor API into an App, not just a router

- Apps have their own rendering engines, only the frontend & the admin panel need views
- The API should be JSON only, with minimal middleware
- Individual sections within the API could/should be treated as Routers

* 🎨 Flatten API middleware inclusion

- get rid of the weird middleware object
- move the api-only middleware into the middleware/api folder
2016-10-11 10:36:00 +02:00
..
api 🎉 Middleware refactor: Give the API its own express App (#7537) 2016-10-11 10:36:00 +02:00
cache-control_spec.js 🎉 Middleware refactor: Give the API its own express App (#7537) 2016-10-11 10:36:00 +02:00
check-ssl_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
decide-is-admin_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
ghost-locals_spec.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
redirect-to-setup_spec.js Ghost OAuth (#7451) 2016-09-30 12:45:59 +01:00
serve-shared-file_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
static-theme_spec.js allow manifest.json in theme root (#6986) 2016-06-29 14:44:01 -06:00
theme-handler_spec.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
uncapitalise_spec.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00