Skip to content

Commit

Permalink
fix name and use yaml instead of yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amalshaji committed Nov 21, 2023
1 parent 8272d5b commit aa8f190
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
keys
keys
.DS_Store
2 changes: 1 addition & 1 deletion cmd/localport/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func configCmd() *cli.Command {
return &cli.Command{
Name: "config",
Usage: "Create/edit the rig config file",
Usage: "Edit the localport config file",
Subcommands: []*cli.Command{
{
Name: "edit",
Expand Down
2 changes: 1 addition & 1 deletion cmd/localport/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const VERSION = "0.0.1-beta"

func main() {
app := &cli.App{
Name: "rig",
Name: "localport",
Usage: "Expose local http/tcp servers to the internet",
Version: VERSION,
Commands: []*cli.Command{
Expand Down
6 changes: 3 additions & 3 deletions cmd/localportd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ const VERSION = "0.0.1-beta"

func main() {
app := &cli.App{
Name: "rigd",
Name: "localportd",
Usage: "Expose local http/ws servers to the internet",
Version: VERSION,
Commands: []*cli.Command{
{
Name: "start",
Usage: "Start the rig server",
Usage: "Start the localport server",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Usage: "config file",
Value: "config.yml",
Value: "config.yaml",
},
},
Action: func(c *cli.Context) error {
Expand Down
3 changes: 2 additions & 1 deletion configs/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ proxy:
host: localhost
port: 8001
secure: false
debug: true
debug: true
domain:
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ VOLUME [ "/app/configs" ]
VOLUME [ "/app/data" ]

ENTRYPOINT ["./localportd", "start"]
CMD [ "--config", "/app/config.yml" ]
CMD [ "--config", "/app/config.yaml" ]
2 changes: 1 addition & 1 deletion docker/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
context: ..
dockerfile: docker/Dockerfile
volumes:
- ../configs/server.yaml:/app/config.yml
- ../configs/server.yaml:/app/config.yaml
- ../data:/app/data/
- ../keys:/app/keys/
ports:
Expand Down
4 changes: 2 additions & 2 deletions internal/client/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func Load(configFile string) (Config, error) {
}

var homedir, _ = os.UserHomeDir()
var DefaultConfigDir = homedir + "/.rig"
var DefaultConfigPath = DefaultConfigDir + "/config.yml"
var DefaultConfigDir = homedir + "/.localport"
var DefaultConfigPath = DefaultConfigDir + "/config.yaml"

func checkDefaultConfigFileExists() bool {
_, err := os.Stat(DefaultConfigPath)
Expand Down

0 comments on commit aa8f190

Please sign in to comment.