Compile service for AutoHotkey scripts
REST service for compiling AutoHotkey scripts .ahk to .exe
Behind the scenes, wine and xvfb are used to run Ahk2Exe, producing a lightweight Linux based container, deployable almost anywhere.
For the UI, see the zvecr/vue-ahk project.
- nodejs (and npm)
- wine
- xvfb
- Ahk2Exe (Installed to the wine path)
The following examples assume either node is running the project or the rest-ahk docker container is running locally.
Note: While this example uses Unix-like paths, the following will produce a Windows executable.
curl -X POST -H "Content-Type: text/plain" --output /tmp/test.exe --data '
^j::
Send, My First Script
return
' localhost:8080/compileTo status endpoint can be used to view the current service status, including various compile stats.
curl http://localhost:8080/statusWhich should produce a JSON object.
{"compile":{"queue":0,"cache":0}}For convenience a .nvmrc file has been provided at the root of the project directory.
npm installnpm run servenpm run buildnpm run startnpm run testnpm run lintA simple workflow to package (and run) the service for production.
docker build --rm -f "Dockerfile" -t rest-ahk:latest .
docker run --rm -it -p 1234:1234/tcp ahk-docker:latest