feat: add go backend skeleton
This commit is contained in:
22
internal/app/config.go
Normal file
22
internal/app/config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
CodexHome string
|
||||
HTTPAddr string
|
||||
}
|
||||
|
||||
func DefaultConfig() Config {
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
home = "."
|
||||
}
|
||||
return Config{
|
||||
CodexHome: filepath.Join(home, ".codex"),
|
||||
HTTPAddr: "127.0.0.1:18083",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user