export server object for using serve programmattically