Skip to content

Commit c214fd6

Browse files
authored
- update main.go
1 parent 2285ddc commit c214fd6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ func main() {
5454
if port > 1<<16-1 {
5555
log.Fatal("Port number too large")
5656
}
57+
58+
if len(mode) < 1 {
59+
file, err := os.OpenFile(path.Join(root, "index.html"))
60+
if err == nil {
61+
mode = "spa"
62+
}
63+
}
5764

5865
// if len(configFilePath) > 0 {
5966
// raw, err := ioutil.ReadFile(configFilePath)
@@ -211,4 +218,4 @@ func main() {
211218
// }
212219
// }
213220
// }
214-
// }
221+
// }

0 commit comments

Comments
 (0)