Minimal Hono server for deploying a binary payload to a configured location.
- Node.js 20+
Create config.yml in the project root:
secret: foobar
locations:
token: location
foobar: /srv/server/
file: /srv/server/some_file.txtBehavior notes:
locationsmust include the providedtoken.- If the location path is a directory, the uploaded file is placed inside it.
- If the location path is a file, the upload writes to that file.
- If the location path does not exist, it is treated as a file path.
npm install
npm run devcurl -X PUT \
--data-binary @foobar.jar \
"http://localhost:3000/deploy?secret=foobar&token=foobar&filename=foobar.jar"Responses:
201on success401whensecretortokenis invalid400whenfilenamecontains/or\
Build and run:
docker build -t deployman .
docker run --rm -p 3000:3000 deploymanTo use a host config file:
docker run --rm -p 3000:3000 -v "$PWD/config.yml:/app/config.yml" deployman