Choose ports dynamically

ran grunt test.
half done -- would I pass the error to .reject() ?