created db, set up routing, and paging