Socket
Book a DemoInstallSign in
Socket

github.com/abdullah-aghayan/website-screenshot

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/abdullah-aghayan/website-screenshot

v0.0.0-20200505192436-2a8d5ff6f6ee
Source
Go
Version published
Created
Source

Website Screenshot

Docker-powered stateless Go API for taking screenshot from provided website

Installation

Before anything you need to have Docker and Golang installed

You can build a single container with the following command

make all

In order to increase the timeout do it as following

make all timeout="-e TIMEOUT=60"

Usage

Application will work on port 8080 so you can send a request following url

http://127.0.0.1:8080

example

http://127.0.0.1:8080/screenshot?url=http://google.com

Scaling

(this part not tested yet)

To scale the application you can use docker-compose scaling feature

docker-compose file


version: '3'

services:

  screenshot:
    image: screenshot:1.0
    environment:
      - TIMEOUT:30

  nginx:
    image: nginx:stable-alpine
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - screenshot
    ports:
      - "8080:8080"

nginx config

user  nginx;

events {
    worker_connections   1000;
}
http {
        server {
              listen 8080;
              location / {
                proxy_pass http://localhost:8080/;
              }
        }
}

then you can do

make scale instance=the_number_of_instance

Contribution are welcome

  • write Unit as well as integration test
  • improving code base
  • improving docker file
  • adding new features
  • make documentation better

FAQs

Package last updated on 05 May 2020

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.