Created
August 3, 2018 05:44
-
-
Save KanishkVashisht/2adf07333c204d8323a6d294728e23fd to your computer and use it in GitHub Desktop.
Simple script to run nightmare with Xvfb on digital ocean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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