This is the current system:
- The plugin loads an array of file routes, all of them are set in docpad.coffee.
- All api entries are called from a unique base url.
Proposed new system:
- We will load multiple JSON files from docpad.coffee.
- The JSON file contains a list of file routes and a base url. So we can load different apis without mixing them.
- Also, each JSON file will set specific configuration for each api.
The benefits of the new system are:
- Loading different apis using different base urls.
- We can use two versions of the same api without refactoring old version.
- We can isolate each api, reducing debugging complexity.
This is the current system:
Proposed new system:
The benefits of the new system are: