mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
make README a little bit less awkward
Signed-off-by: Odyssium <hi@odyssey346.dev>
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user