Feature: port

This commit is contained in:
VnPower 2023-06-06 09:20:46 +07:00
parent 9dcf31f420
commit b84407b268
Signed by: vnpower
GPG key ID: 881DE3DEB966106C
4 changed files with 15 additions and 3 deletions

View file

@ -17,7 +17,7 @@ A privacy-respecting alternative front-end for Pixiv that doesn't suck
## Installation
Run these commands below, then access the site on [localhost:8080](https://localhost:8080)
Run these commands below.
```
git clone https://codeberg.org/VnPower/pixivfe.git
@ -28,6 +28,14 @@ cp config.example.yml config.yml # config file
You will have to add your own `PHPSESSID` in order to run. Go to `config.yml` for more details.
After that, execute the code.
```
go run main.go
```
By default, if you did not configure the port, the site will run on localhost:8080
## Self-host guide
WIP

View file

@ -1,11 +1,14 @@
# This is required for the API. See https://github.com/Nandaka/PixivUtil2/wiki#pixiv-login-using-cookie
# Please keep this carefully, there is a risk of account theft if somebody got your cookie.
# It is better to use a decoy account, instead of using your main account's cookie.
PHPSESSID:
PHPSESSID: XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Port: 8080
UserAgent: Mozilla/5.0
# Number of items in each list page
# This is going to be deprecated
PageItems: 30
# Default image proxy server. Recommended since Pixiv doesn't like you accessing images on their server.

View file

@ -11,6 +11,7 @@ var Configs Conf
type Conf struct {
PHPSESSID string `yaml:"PHPSESSID"`
Port string `yaml:"Port"`
UserAgent string `yaml:"UserAgent"`
PageItems int `yaml:"PageItems"`
ImageProxyServer string `yaml:"ImageProxyServer"`

View file

@ -171,5 +171,5 @@ func main() {
r := setupRouter()
r.Run(":8080")
r.Run(":" + configs.Configs.Port)
}