whatwg / build.whatwg.org

Build server for running whatwg/wattsi
Creative Commons Zero v1.0 Universal
12 stars 12 forks source link

build.whatwg.org

This app is a build server to allow you to run html-build and Wattsi without having to actually install many dependencies locally.

Currently it is hosted on build.whatwg.org.

Endpoints

/wattsi

The /wattsi endpoint accepts POSTs with the following request body fields:

You can also send the following query string parameters, which correspond to the same-named Wattsi options:

If the resulting status code is 200, the result will be a ZIP file containing the output, as well as an output.txt containing the stdout/stderr output. If the resulting status code is 400, the body text will be the error message.

The response will have a header, 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.

/html-build

The /html-build endpoint accepts POSTs with the following request body fields:

You can send the following query string parameters, which correspond to the same-named html-build options:

If the resulting status code is 200, the result will be a ZIP file containing the output, as well as an output.txt containing the stdout/stderr output. If the resulting status code is 400, the body text will be the error message.

The response will have a header, Exit-Code, which gives the exit code of html-build. 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 html-build failed.

/version

This endpoint responds to GET requests so you can check to see if the server is working. It returns a text/plain response of the latest-deployed Git commit SHA.

Server Development Info

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 --omit=dev. 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