On a "fresh" run of the unit tests (when the HOST_DIR directory is empty), the unit tests will fail because the template files don't exist yet.
This is mainly an async issue, since their creation is handled as Promises inside routes, which can't return Promises to Express. This should probably be handled by rearranging the code, so that the template creation can be properly handled as async. (Why are those files being created at route creation, anyways?)
IMO can improve the pipelines here a bit. Would like some separation between init processes and the server creation, and reduce surface area of various components. Async should be handled as root as possible so those pieces don't get lost during sync code.