docs:compile

This commit is contained in:
samwaf
2025-01-16 09:07:25 +08:00
parent b4e9571933
commit ad62d9276f
5 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@@ -13,7 +13,6 @@
registration_data.bin
dist/
.idea/
/public/dist/*
!/public/dist/.gitkeep
/logs/*
/ssl/

View File

@@ -222,6 +222,9 @@ Linux: ./SamWafLinux64 start
How to Compile
[Compilation Instructions](./docs/compile.md)
Compile Online Manual
[https://doc.samwaf.com/en/dev/](https://doc.samwaf.com/en/dev/)
## Tested and Supported Platforms
[Tested and Supported Platforms](./docs/Tested_supported_systems.md)

View File

@@ -219,6 +219,9 @@ PS:windows服务形式升级时候貌似会触发360、火绒规则导致无法
How to compile
[编译说明](./docs/compile.md)
在线编译手册:
[https://doc.samwaf.com/dev/](https://doc.samwaf.com/dev/)
## 已测试支持的平台
[已测试支持的平台](./docs/Tested_supported_systems.md)

0
public/dist/.gitkeep vendored Normal file
View File

View File

@@ -27,7 +27,11 @@ func initIndex() {
zlog.Error("failed to read index.html: %v", err)
}
defer func() {
_ = indexFile.Close()
if indexFile != nil {
_ = indexFile.Close()
} else {
zlog.Error("index.html not exist, you may forget to put dist of frontend to public/dist .Download from https://github.com/samwafgo/SamWafWeb/releases")
}
}()
index, err := io.ReadAll(indexFile)
if err != nil {