Tells you if appium is running or available.
npm install appium-running
import ar from 'appium-running';
ar(4723).then( (success) => {
if(success) {
console.log("Appium is running, move on!");
// run test
}else{
console.log("Appium is not running, exec appium &");
// throw exception
}
});