export server object for using serve programmatically