setup db and routes