go, barcode, server

Diogo Silva 6329ccb48c readme formatting 8 年之前
public cc69ee55be Initial commit 8 年之前
.gitignore def8a4f836 Better makefile 8 年之前
Dockerfile cc69ee55be Initial commit 8 年之前
Makefile def8a4f836 Better makefile 8 年之前
README.md 6329ccb48c readme formatting 8 年之前
barcodeserver.go cc69ee55be Initial commit 8 年之前

README.md

BarCodeServer

Simple HTTP API around https://github.com/boombuler/barcode.

Api Usage

Simply issue a get using the type of barcode desired as path and the content as queryString content and it will return a redirect to generated png.

$ curl -v http://localhost:8080/datamatrix?content=Whatever%20data

Available types:

  • codabar
  • code128
  • code39
  • ean
  • datamatrix
  • qr
  • 2of5

In case of error it will return Bad Request 400 and error in plain/text.

Deploy

Using the binary, download from the release page and run the binary and it will bind to port 8080.

Using docker:

$ docker run -p 8080:8080 -v /tmp/barcodes:/opt/barcode/public diogok/barcodeserver

It will save generated code at public folder. You can delete generated artefacts and if requested server will regenerate.

License

MIT , same as https://github.com/boombuler/barcode.