example: basic example for the directory middleware