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:
-
Get a local copy of
html.json
from https://raw.githubusercontent.com/w3c/mdn-spec-links/master/html.json. -
Get the HTML spec source file
source
by checking out whatwg/html. -
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.)
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.
This server requires the following to run:
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