mutualize how local server is started for tests