Skip to content

Instantly share code, notes, and snippets.

@sahajamit
Last active November 22, 2016 10:31
Show Gist options
  • Save sahajamit/b1c003836f3ce24c9d43 to your computer and use it in GitHub Desktop.
Save sahajamit/b1c003836f3ce24c9d43 to your computer and use it in GitHub Desktop.
You can start Appium server from the job itself using PM2,
Please find the commands we are currently running
pm2 start /usr/local/lib/node_modules/appium/lib/server/main.js
pm2 logs
pm2 delete main
pm2 stop <id>
pm2 stop main
pm2 list
pm2 describe <id>
pm2 describe main
pm2 start lib/server/main.js -- -U <iOS UDID>
pm2 start -f lib/server/main.js -- -U <Android UDID> --chromedriver-port 9516 -p 4724 -bp 2253
pm2 start -f lib/server/main.js -— -U <Android UDID> --chromedriver-port 9517 -p 4725 -bp 2254
all these commands can trigger from one .js file
@Kignuf
Copy link

Kignuf commented Nov 22, 2016

Hello, I'm trying to manage multiple appium process through pm2 however I'm unable to make it work at the moment.
appium won't launch by running the main script mentioned above (it has moved to /usr/local/lib/node_modules/appium/lib/main.js).

I also tried by telling pm2 to use "appium" command instead of node, but omitting the script is not permitted.

Are you still running this code, or do you have more recent insights on this problem ? Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment