Skip to content

terrorizer1980/build.whatwg.org

 
 

Repository files navigation

build.whatwg.org

This app is a build server to allow you to run Wattsi without having to actually install it locally. Which is really useful, since not everyone has a Free Pascal compiler lying around.

Currently it is hosted on build.whatwg.org. You can use it as follows:

  1. Get a local copy of html.json from https://raw.githubusercontent.com/w3c/mdn-spec-links/master/html.json.

  2. Get the HTML spec source file source by checking out whatwg/html.

  3. Run the following command:

    curl https://build.whatwg.org/wattsi --verbose \
         --form build=default \
         --form sha=d3adb33f \
         --form source=@source \
         --form mdn=@html.json \
         --output output.zip

The result will be a ZIP file containing the output of Wattsi! It will also contain an output.txt file containing the stdout output of Wattsi, which might contain warnings or similar things you want to check out.

(NOTE: if you get a non-200 response, the resulting zip file will actually be a text file containing some error text. To account for this, you may want to use a more complicated incantation.)

Other Features

You can send the query string parameter quiet to pass the --quiet option to Wattsi.

You can send the query string paramter single-page-only to pass the --single-page-only option to Wattsi.

The response will have a header, Wattsi-Exit-Code, which gives the exit code of Wattsi. This will always be 0 for a 200 OK response, but a 400 Bad Request could give a variety of different values, depending on how Wattsi failed.

You can hit the /version endpoint with a GET to check to see if the server is working. It should return the text/plain response of the latest-deployed Git commit SHA.

Server Development Info

This server requires the following to run:

  • Node.js 11.4.0 or later
  • 7zip in your path as 7za
  • And, of course, Wattsi, in your $PATH as wattsi

It will expose itself on the port given by the $PORT environment variable.

To set up the server remember to do npm install --production. Then, to start it running, just do npm start.

Alternately, you can use Docker:

docker build --tag build.whatwg.org .
docker run -p 3000:3000 --interactive --tty build.whatwg.org

About

Build server for running whatwg/wattsi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.0%
  • Dockerfile 10.0%