fix!: change default assets to local

This commit is contained in:
Noah Hsu
2022-07-22 13:39:25 +08:00
parent 532a326ad6
commit c711ba53a3

View File

@ -24,26 +24,26 @@ type CacheConfig struct {
} }
type Config struct { type Config struct {
Force bool `json:"force"` Force bool `json:"force"`
Address string `json:"address" env:"ADDR"` Address string `json:"address" env:"ADDR"`
Port int `json:"port" env:"PORT"` Port int `json:"port" env:"PORT"`
Assets string `json:"assets" env:"ASSETS"` Assets string `json:"assets" env:"ASSETS"`
LocalAssets string `json:"localassets" env:"LOCALASSETS"` LocalAssets string `json:"localassets" env:"LOCALASSETS"`
SubFolder string `json:"subfolder" env:"SUBFOLDER"` SubFolder string `json:"subfolder" env:"SUBFOLDER"`
Database Database `json:"database"` Database Database `json:"database"`
Scheme Scheme `json:"scheme"` Scheme Scheme `json:"scheme"`
Cache CacheConfig `json:"cache"` Cache CacheConfig `json:"cache"`
TempDir string `json:"temp_dir" env:"TEMP_DIR"` TempDir string `json:"temp_dir" env:"TEMP_DIR"`
} }
func DefaultConfig() *Config { func DefaultConfig() *Config {
return &Config{ return &Config{
Address: "0.0.0.0", Address: "0.0.0.0",
Port: 5244, Port: 5244,
Assets: "https://npm.elemecdn.com/alist-web@$version/dist", Assets: "/",
SubFolder: "", SubFolder: "",
LocalAssets: "", LocalAssets: "",
TempDir: "data/temp", TempDir: "data/temp",
Database: Database{ Database: Database{
Type: "sqlite3", Type: "sqlite3",
Port: 0, Port: 0,