move db config behind environ, add basic HTTP-level tests