changed to public server

This commit is contained in:
2024-05-23 22:56:36 +02:00
parent 3990c620a1
commit 68685b53b0
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ import (
"strings" "strings"
) )
const URL = "http://localhost:3000" // const URL = "http://localhost:3000"
const URL = "https://pms-xdib.onrender.com"
func showHelp() { func showHelp() {
fmt.Println("wpm - Wyst Package Manager") fmt.Println("wpm - Wyst Package Manager")
+1 -1
View File
@@ -52,7 +52,7 @@ func sendRequest(method, url string, jsonBody []byte) (Request, error) {
func getPackage(packageName string) (PackageIndex, error) { func getPackage(packageName string) (PackageIndex, error) {
var pkgidx PackageIndex var pkgidx PackageIndex
jsonBody := []byte(fmt.Sprintf(`{"name": "%s"}`, packageName)) 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 { if err != nil {
fmt.Printf("Fetching error: %s\n", err) fmt.Printf("Fetching error: %s\n", err)
} }