initial server that generates keys & connects to DB