Wrap webapp in a creation function.

This lets us spawn multiple instances of Pathod.