What I did:
var webshot = require('webshot');
webshot('google.com', 'google.png', function(err) {
// screenshot now saved to google.png
});
What didn’t work: The screenshot was not saved. I tried it on Linux Mint and it worked perfectly but when it comes to using DigitalOcean it did not. Any help will be appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
“Does not work” is useless. Give us more information. Did you install the requirements?
I did the same steps on my local, did npm install webshot and ran the script, the screenshot was saved in the same path as the script. However on DigitalOcean, I did exactly the same thing. After I ran the script, I did an ls to show the files but I could not find google.png.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.