From f44d08de9d261d12adfb33c41af969c552bc8786 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Tue, 21 Sep 2021 18:10:52 +0930 Subject: [PATCH] Docco and logging` --- README.md | 16 +++++++++++++--- main.go | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a408666..96f8526 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,23 @@ ## Pre-requisites -* youtube-dl (plus any of it's required dependencies, like ffmpeg) +* youtube-dl (plus any of its required dependencies, like ffmpeg) * golang compiler ## Build -TBD + go build ## Running -TBD + ./gropple -port 8000 -address http://hostname:8000 -path /downloads + +With no arguments, it will listen on port 8000 and use an address of 'http://localhost:8000'. + +The address must be specified so that the bookmarklet can refer to the correct +host when it is not running on your local machine. You may also need to specify +a different address if you are running it behind a proxy server or similar. + +## Using + + diff --git a/main.go b/main.go index 776efb5..17d4c58 100644 --- a/main.go +++ b/main.go @@ -64,6 +64,8 @@ func main() { ReadTimeout: 5 * time.Second, } + log.Print("starting web service") + log.Printf("go to %s for details on installing the bookmarklet and to check status", address) log.Fatal(srv.ListenAndServe()) }