feat: add home page

This commit is contained in:
Jon Lundy
2023-03-27 15:29:04 -06:00
parent 536483b73f
commit e0b5fe07f0
10 changed files with 275 additions and 64 deletions
+3 -2
View File
@@ -2,7 +2,6 @@ package main
import (
"context"
"io/ioutil"
"log"
"net"
"net/http"
@@ -44,7 +43,7 @@ func run(ctx context.Context) {
)
hostKeys := envMust("SSH_HOSTKEYS")
files, err := ioutil.ReadDir(hostKeys)
files, err := os.ReadDir(hostKeys)
if err != nil {
log.Fatal(err)
}
@@ -52,6 +51,8 @@ func run(ctx context.Context) {
opts = append(opts, ssh.HostKeyFile(filepath.Join(hostKeys, f.Name())))
}
loadTemplates()
srv := &server{
bindHost: envDefault("SSH_HOST", bindHost),
domainName: envDefault("SSH_DOMAIN", domainName),