stop server when app exits

if we don't do this, the app doesn't exit