Finish the server part for the factory