CLI application that takes an url ? and generates a Qr code
qr -o qr.png "https:google.com"
- create CLI
- Parse flags
- Generate a qr (qr library)
- save to file
Evolve this to a HTTP server which exposes an endpoint that takes the same url and returns an image of the qr code
- HTTP server
- URL parsing
- Maybe add a router ?
- Extract parameter
- Return an image
qr -u "https://google.com" -o image.png
qr -server
- CLI has a new flag that runs in server mode
- Server mode exposes an endpoint that takes a url and brings back a QR image
- We want the API responses to be similar to https://placehold.co/ i.e if you put the url in an
tag the browser should be able to render the qr code just fine
- ✅ Creating an HTTP server
- ✅ Extract the url from the endpoint.
- ✅ Adding additional "server-mode" flag to the CLI.
- ✅ Reuse the existing qr generation logic to return the image.
- ✅ Proper test http (instead of using phone).
- ✅ Add Tests & re-structure the code to make it more testable.
- ✅ Refactor to split things in different files with a logical flow.
- Embed html for a UI for adding the URL.
- Define the service GRPC