From 68685b53b0a9f1b22bcceb6d518ed2a02ff460bb Mon Sep 17 00:00:00 2001 From: Leo dev Date: Thu, 23 May 2024 22:56:36 +0200 Subject: [PATCH] changed to public server --- src/actions.go | 3 ++- src/fetcher.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/actions.go b/src/actions.go index 8139ede..45e65d8 100644 --- a/src/actions.go +++ b/src/actions.go @@ -6,7 +6,8 @@ import ( "strings" ) -const URL = "http://localhost:3000" +// const URL = "http://localhost:3000" +const URL = "https://pms-xdib.onrender.com" func showHelp() { fmt.Println("wpm - Wyst Package Manager") diff --git a/src/fetcher.go b/src/fetcher.go index 6dc7e91..4883230 100644 --- a/src/fetcher.go +++ b/src/fetcher.go @@ -52,7 +52,7 @@ func sendRequest(method, url string, jsonBody []byte) (Request, error) { func getPackage(packageName string) (PackageIndex, error) { var pkgidx PackageIndex jsonBody := []byte(fmt.Sprintf(`{"name": "%s"}`, packageName)) - req, err := sendRequest(http.MethodGet, "http://localhost:3000", jsonBody) + req, err := sendRequest(http.MethodGet, URL, jsonBody) if err != nil { fmt.Printf("Fetching error: %s\n", err) }