Ghost/core/server/web/parent
Naz 9c64d7af81 Centralized base API path value across server codebase
refs https://github.com/TryGhost/Team/issues/1420

- This changeset makes the "/ghost/api" base path for the APIs centralized in one place and reused by dependent modules. There are couple benefits this refactor brings: easy way to spot where the API base path is used (was hard to find it in regexp) and makes it easy to change the hardcoded path to a configurable one in the future (e.g. host all APIs under `domain.tld/custom-path/awesome-apis/posts`)
- I hear that scream from the back of your head: "But hey! This introduced coupling to url-utils!". To that my unswer is: "No. This change only makes the coupling explicit, it's been there already and now can be addressed if we need to!".
- A neat thing about his change, making the API work on a custom path is one line away, by moving the hardcoded `/ghost/api` to a config ;)
2022-03-09 17:15:51 +08:00
..
middleware Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
app.js Moved vhost mounts into boot file 2021-12-06 21:28:53 +13:00
backend.js Centralized base API path value across server codebase 2022-03-09 17:15:51 +08:00
frontend.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00