Giter Site home page Giter Site logo

golem's Introduction

GOLEM

Run the webstrates poxy

  $ docker run --name webstrates  -p 80:80 -v ${PWD}/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx

Run a golem

  $ docker run -ti -p 9222:9222 -e "WEBSTRATEID=xxxxxx" --security-opt seccomp=${PWD}/chrome.json --name golem-xxxxxx --link webstrates webstrates/golem

Basic-auth

Use e.g. a preconfigured proxy https://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy

Simplest case

    <body>
      <golem>
        // goes to a golem spawner which returns a script that is run partly in the browser, partly in the golem
        // the part in the browser simply uses the url to ensure a single golem is running for each webstrate
        // the part in the golem (guarded by a user-agent check) runs the actual golem code
        // User-agent check (headless chrome) 
        // Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36
        <script src="golems.cs.au.dk/spawn" type="text/javascript"></script>
        <div id="counter">
        </div>
        <pre>
          var count = 0;
          setTimeout(1000, function() {
            document.querySelector("golem > #counter").innerText = count;
            count++;
          });
        </pre>
      </golem>
    </body>

The golem soul

<body>
  <golem id="golem.1">
    <pre class="package" type="application/json">
      {
        "name": "My golem"
      }
    </pre>
    <pre class="frontend" type="text/javascript">
      golem.on('message', function(msg) {

      });
    </pre>
    <pre class="backend" type="text/javascript">
    </pre>

golem's People

Contributors

jonathanbp avatar

Stargazers

Jens Kristian Villadsen avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

jkiddo

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.