maxsei / static-spoof

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static Spoof

static-spoof is an excerise for showing how to serve file at arbitrary paths. In this example there are two image that have different paths that the backend maps to the same image. This is done by setting a mapping different paths to the same image path and then writing the same image bytes to the frontend.

Running

  1. activate the dev environment by running nix-shell
  2. run the main program with go run main.go <path to the image to serve>
  3. navigate to localhost:8080 in browser

About


Languages

Language:Go 86.1%Language:Nix 13.9%