Following is a code of a complete application that serves a static HTML file as response to a request.
This example illustrates resource initialization by application manager and sharing resources between request handlers. Also with such architecture, it can avoid initializing resources per request, unless required. This avoids performance penalty at runtime.
The application code is in appendix.