Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v3/internal/commands/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type DevOptions struct {
}

func Dev(options *DevOptions) error {
host := "localhost"
host := "127.0.0.1"

// flag takes precedence over environment variable
var port int
Expand Down
4 changes: 2 additions & 2 deletions v3/pkg/application/application_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ func (a *App) preRun() error {
if frontendURL != "" {
devMode = true
// We want to check if the frontend server is running by trying to http get the url
// and if it is not, we wait 500ms and try again for a maximum of 10 times. If it is
// and if it is not, we wait 500ms and try again for a maximum of 30 times. If it is
// still not available, we return an error.
// This is to allow the frontend server to start up before the backend server.
client := http.Client{}
a.Logger.Info("Waiting for frontend dev server to start...", "url", frontendURL)
for i := 0; i < 10; i++ {
for i := 0; i < 30; i++ {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
_, err := client.Get(frontendURL)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
if err == nil {
a.Logger.Info("Connected to frontend dev server!")
Expand Down
Loading