main: factor to support externally supplied store.
Optionally serve HTTP during tests: incomplete.