Socket
Book a DemoInstallSign in
Socket

screengrab-server

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screengrab-server

Take screengrabs of HTML elements or React components on your website

1.0.3
latest
npmnpm
Version published
Maintainers
1
Created
Source

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
const server = require("screengrab-server")
const PORT = process.env.PORT || 3000
server.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'

const screengrab = ScreenGrab({
  server: 'http://localhost:3031'
})

const image = await screengrab.url('https://memezoo.app').grab()

console.log('screengrab url', image.url)

To use the cloud hosted ScreenGrab.cloud

import { ScreenGrab } from 'screengrab.js'

const screengrab = ScreenGrab('api-key')

const image = await screengrab.url('https://memezoo.app').grab()

console.log('screengrab url', image.url)

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

Keywords

screengrab

FAQs

Package last updated on 09 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.