A simple JSON API which takes in a composer.json file and responds with it's composer.lock file.
Build the binary
go build
Start the server
./composer-lock
Send a request containing your composer.json in the body
curl -X POST --data "@/path/to/composer.json" localhost:5799
The server will place the composer.json contents into a temporary directory and run composer install
. The resulting lock file will be in the body of the response. If an error occurs, it will return JSON in the following format:
{
"Status": "error",
"Detail": "details about the error"
}