In the course of working on adding a full /html-build endpoint, a few improvements came up which we can apply ahead of time to just the /wattsi endpoint:
Improve README documentation.
Abstract out the code for turning query parameters into boolean arguments.
Use more modern JS features.
Put temporary directories inside the OS temp directory.
Add a new helper for spawning a command-line program while capturing its output. This fixes #3.
Perform cleanup file deletions in parallel and log errors if they occur while deleting.
Move from deprecated --production npm install argument to modern --omit=dev.
In the course of working on adding a full /html-build endpoint, a few improvements came up which we can apply ahead of time to just the /wattsi endpoint: