Giter VIP home page Giter VIP logo

krishanthisera / grender Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 38 KB

Grender is a web rendering service written in Go that leverages a headless Chrome browser to render and cache web pages. The application supports various backends, including AWS S3 and local file systems, for storing cached content.

Go 93.39% Dockerfile 6.61%
aws chrome chrome-devtools chromedp gin golang prerender prerendering s3 seo

grender's Introduction

Grender - Web Page Renderer

โ— This project is in a very early stage of development. โ—

Grender is a web rendering service written in Go that leverages a headless Chrome browser to render and cache web pages. The application supports various backends, including AWS S3 and local file systems, for storing cached content.

Configuration

The server is configured using a config.yaml file. Here's an example:

version: v1
# There are three modes: "rendering" and "recaching"
modes: 
  rendering: true
  recaching: true
renderingConfig:
  pageWaitTime: 10
  pageWaitCondition: '(function() { return window.prerenderReady === true })()'
  # requestHeaders:
  #   - name: "X-Grender-Request"
  #     value: "1"
server:
  port: "8080"
  responseHeaders:
    - name: "X-Prerender"
      value: "1"
backend:
  fileSystem:
    baseDir: "./tmp"
  # s3:
  #   bucketName: "grender.io"
  #   region: "ap-southeast-2"
invalidate:
  amqp:
    uri: "amqp://user:password@localhost:5672/"
    timeout: 10
    queue: "invalidate" 

Running the Server

To run the server, use the following command:

go run main.go

Make sure to have your config.yaml file in the same directory where you run this command.

Project Structure

The main components of the project are organized into packages:

  • pilot: Contains the main Grender application files, including configuration, rendering logic, and server setup.
  • backend: Provides interfaces and implementations for different backends, such as S3 and file systems.
  • render: Implements the rendering logic using a headless Chrome browser.

Dependencies

Grender relies on third-party packages for AWS S3 integration, YAML parsing, and headless Chrome browser automation.

grender's People

Contributors

krishanthisera avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.