Skip to content

Instantly share code, notes, and snippets.

@KanishkVashisht
Created August 3, 2018 05:44
Show Gist options
  • Save KanishkVashisht/2adf07333c204d8323a6d294728e23fd to your computer and use it in GitHub Desktop.
Save KanishkVashisht/2adf07333c204d8323a6d294728e23fd to your computer and use it in GitHub Desktop.
Simple script to run nightmare with Xvfb on digital ocean
#dependencies
apt-get update &&\
apt-get install -y libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb
npm install segmentio/nightmare
# Start Xvfb
Xvfb -ac -screen scrn 1280x2000x24 :9.0 & export DISPLAY=:9.0
#I would usually format it by breaking the line at & but if you dont run the export in the same statement it doesnt seem to work
#start script
node index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment