connect lifespan to database