You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 31, 2026. It is now read-only.
Derek Clarkson edited this page Oct 8, 2023
·
2 revisions
In addition to serving responses from defined API endpoints Voodoo can also serve files from a directory based on the path.
This is most useful for things like image files where the path of the incoming request can be directly mapped onto the directory structure.
For example, http://127.0.0.1/8080/images/company/logo.jpg can be mapped to a file in Tests/files/images/company/logo.jpg.
To achieve this mapping add the VoodooServer initialiser argument filePaths: [URL(string: "Tests/files"]), or the voodoo command line argument --file-dir Tests/files.
To add multiple directories with voodoo just repeat the argument as many times as you need.