server and db setup