add app state, and fix a few bugs

This commit is contained in:
Zoe
2025-05-03 19:03:09 -05:00
parent c891c24843
commit 4ab58f6324
12 changed files with 143 additions and 83 deletions

View File

@@ -14,9 +14,12 @@ func StartCommand(ctx CommandCtx, args []string) error {
// Put request to start the project, since the start endpoint is idempotent.
// If the project is already running, this will return a 304 Not Modified
util.PutRequest(ctx.Config.DaemonURL+"/app/"+projectName.Id+"/start", nil)
err = util.PutRequest(ctx.Config.DaemonURL+"/app/"+projectName.Id+"/start", nil)
if err != nil {
return fmt.Errorf("failed to start %s: %v", projectName.Name, err)
}
fmt.Printf("Successfully started %s\n", projectName)
fmt.Printf("Successfully started %s\n", projectName.Name)
return nil
}