-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Toby Padilla
committed
Oct 4, 2021
1 parent
61d135d
commit a964f74
Showing
18 changed files
with
99 additions
and
481 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
soft-serve | ||
.ssh | ||
.repos | ||
dist | ||
.terraform* | ||
*.tfstate* | ||
*auto.tfvars | ||
cmd/soft/soft | ||
cmd/soft/.ssh | ||
cmd/soft/.repos |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/charmbracelet/soft" | ||
|
||
"github.com/meowgorithm/babyenv" | ||
) | ||
|
||
type serverConfig struct { | ||
Host string `env:"SOFT_SERVE_HOST" default:""` | ||
Port int `env:"SOFT_SERVE_PORT" default:"23231"` | ||
KeyPath string `env:"SOFT_SERVE_KEY_PATH" default:".ssh/soft_serve_server_ed25519"` | ||
RepoPath string `env:"SOFT_SERVE_REPO_PATH" default:".repos"` | ||
AuthKey string `env:"SOFT_SERVE_AUTH_KEY" default:""` | ||
} | ||
|
||
func main() { | ||
var cfg serverConfig | ||
err := babyenv.Parse(&cfg) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
s := soft.NewServer( | ||
cfg.Host, | ||
cfg.Port, | ||
cfg.KeyPath, | ||
cfg.RepoPath, | ||
cfg.AuthKey, | ||
) | ||
log.Printf("Starting SSH server on %s:%d\n", cfg.Host, cfg.Port) | ||
err = s.ListenAndServe() | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module soft-serve | ||
module github.com/charmbracelet/soft | ||
|
||
go 1.17 | ||
|
||
|
Oops, something went wrong.