move database setup (mongodb) out of db route (http endpoint)
use a mapping for handlers, schemas, and routes
rename some variables