Skip to content

oligriffiths/bot-render

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bot-render

A Docker container which runs headless Chrome and renders web pages on the fly.

Dependencies

This project requires Node 7+ and Docker (installation instructions).

Installing

Install node dependencies using:

npm install

Install Chrome:

apt-get install google-chrome-beta

Running locally

With a local instance of Chrome Beta installed, you can start the server locally:

npm start

To test a rendering, send a request:

http://localhost:3000/?url=https://dynamic-meta.appspot.com

Docker

After installing docker, build the docker image:

docker -t bot-render .

Start a container with the built image:

docker run --name bot-render-container bot-render

Send a request to the server running inside the container:

docker exec bot-render-container curl http://localhost:8080/?url=https://dynamic-meta.appspot.com

Stop the container:

docker kill bot-render-container

Clear containers:

docker rm -f $(docker ps -a -q)

About

Renders a webpage for bot consumption (not production ready)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%