From b89159f9acfc5d310cd2f78f3464df5f0e790653 Mon Sep 17 00:00:00 2001 From: Odyssium Date: Sun, 2 Apr 2023 12:46:46 +0200 Subject: [PATCH] make README a little bit less awkward Signed-off-by: Odyssium --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b057cfe..af4efc5 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,17 @@ go build -o gothub ./gothub serve ``` +GotHub includes a setup wizard that will set the environment variables for you. Run `./gothub setup`. + If you don't want to use port 3000 for GotHub, set the GOTHUB_PORT environment variable to the port you want to use. -If you want to be in the official instance list, you also need to fill these Instance Privacy environment variables: +You can create a ``.env`` file in the root directory of GotHub and set the environment variables there, which is what ``./gothub setup`` does. + +These are the environment variables that are being used by GotHub: ``` +GOTHUB_PORT=3000 # optional +GOTHUB_USER_AGENT="GotHub/1.0.0" # optional, it comes with a Chrome on Windows 10 user agent by default +# The following are optional, but required if you want your instance to be listed on the instances page GOTHUB_IP_LOGGED=true/false GOTHUB_REQUEST_URL_LOGGED=true/false GOTHUB_USER_AGENT_LOGGED=true/false @@ -80,15 +87,10 @@ gothub.example.com { reverse_proxy localhost:(the port for GotHub) } ``` +### Web server configuration (other web servers) +Just make sure that you pass the Host and IP headers (X-Forwarded-For) to GotHub. ## Scraping -Other than for the explore page, gothub uses scraping in order to retrieve the information. - -This makes it hard for gothub to get ratelimited. - -You can also set the GOTHUB_USER_AGENT envvar in order to set the user agent with which GotHub makes requests to Github. - -By default, we use the user agent of Chrome 110 on Windows 10. - +GotHub utilizes scraping powered by [Colly](http://go-colly.org/) to retrieve information from GitHub for everything except the explore page. By default, GotHub uses Chrome on Windows 10 as the user agent, but you can change it by setting the `GOTHUB_USER_AGENT` environment variable. ## Funding Our domain [gothub.app](https://gothub.app) is funded by the [Project Segfault](https://projectsegfau.lt) team, which is our only expense other than blood, sweat and tears. So, if you'd like to donate to GotHub, you can donate it to your favourite instance host or [Project Segfault](https://projectsegfau.lt/donate).