Skip to content

Repository files navigation

ScreenGrab-server

Take screengrabs of HTML elements or React components on your website

Get Started

Fist log into https://screengrab.cloud and get your API Key from the dashboard

Quick Start

Install as a library in your project

npm install --save screengrab-server
constserver=require("screengrab-server")constPORT=process.env.PORT||3000server.listen(PORT,()=>{console.log('Server listening on ',PORT)})

OR Clone the repository

git clone https://github.com/imageapi-dev/screengrab-server

Install and start the server

npm install # install nodejs dependencies
cp .env.example .env # copy to .env
npm run start # start dev server

Use screengrab.js to take screenshots

See: https://github.com/screengrab-cloud/screengrab.js

Import screengrab.js into your code and get screenshots from your dev server

import{ScreenGrab}from'screengrab.js'constscreengrab=ScreenGrab({server: 'http://localhost:3031'})constimage=awaitscreengrab.url('https://memezoo.app').grab()console.log('screengrab url',image.url)

To use the cloud hosted ScreenGrab.cloud

import{ScreenGrab}from'screengrab.js'constscreengrab=ScreenGrab('api-key')constimage=awaitscreengrab.url('https://memezoo.app').grab()console.log('screengrab url',image.url)

For detailed information refer to https://docs.screengrab.cloud

About

Take screenshots of react components and html elements

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages