squarepic

command module
v0.0.0-...-a2e66a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 16 Imported by: 0

README

squarepic

squarepic is a simple server that generates a unique picture of squares for any GET request. It features:

  • per-request image size and square count parameters
  • configurable defaults

Requirements

Some version (preferably latest) of Go installed.

Running

Acquire dependency & run:

$ go get github.com/mc0239/logm
$ go run .

On first run, program will generate a config file and exit. Edit configuration file (if needed) and re-run.

Making a request with non-empty help GET parameter displays a help page with possible options:

http://localhost:9001/?help=1

Example requests:

http://localhost:9001/literally-anything!!!
http://localhost:9001/aaaaa?size=100
http://localhost:9001/something/very/cool?size=200&squares=10
http://localhost:9001/bzk?size=10&mirror=1

Building

Instead of run, do build:

$ go build .

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL