Ghost/core/server/api
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
..
app.js 🎉 Middleware refactor: Give the API its own express App (#7537) 2016-10-11 10:36:00 +02:00
authentication.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
clients.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
configuration.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
db.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
index.js Ghost OAuth (#7451) 2016-09-30 12:45:59 +01:00
invites.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
mail.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
notifications.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
posts.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
roles.js Refactor handlePermissions 2015-08-11 16:03:57 +02:00
schedules.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
settings.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
slack.js Slack integration 2016-05-08 12:49:15 +02:00
slugs.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
subscribers.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
tags.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
themes.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
upload.js feature: upload validation middleware (#7208) 2016-08-18 20:25:51 +01:00
users.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
utils.js Error creation (#7477) 2016-10-06 13:27:35 +01:00