server runs infinitely, single-threaded