Skip to content

Commit

Permalink
Log server start
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Padilla committed Jul 30, 2021
1 parent af11646 commit daeb6bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"log"
"smoothie/tui"

tea "github.com/charmbracelet/bubbletea"
Expand All @@ -16,15 +17,15 @@ func main() {
var cfg Config
err := babyenv.Parse(&cfg)
if err != nil {
panic(err)
log.Fatalln(err)
}
btm := BubbleTeaMiddleware(tui.SessionHandler, tea.WithAltScreen())
s, err := NewServer(cfg.Port, cfg.KeyPath, LoggingMiddleware(), btm)
if err != nil {
panic(err)
log.Fatalln(err)
}
err = s.Start()
if err != nil {
panic(err)
log.Fatalln(err)
}
}
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ func (srv *Server) passHandler(ctx ssh.Context, pass string) bool {
}

func (srv *Server) Start() error {
log.Printf("Starting SSH server on %s\n", srv.server.Addr)
return srv.server.ListenAndServe()
}

0 comments on commit daeb6bf

Please sign in to comment.