From 89ada0c9e2ca76252897083a9d34462ec6f3685e Mon Sep 17 00:00:00 2001 From: Gregory Gaines Date: Sun, 6 Apr 2025 13:02:07 -0400 Subject: [PATCH 1/5] chore: Mention setting function target env variable when starting dev server from ide --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 7d54bcb..201fd7f 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,16 @@ handling logic. ) func main() { + // Normally, you should start the local development server from the command + // line, but certain IDE's like Intellij and VSCode support directly running + // go applications inside the IDE directly. In these cases, the function won't + // be recognized. In these cases, set the "FUNCTION_TARGET" env variable directly + // to ensure the function is registered for the local server. + // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") + // if err != nil { + // log.Fatalf("failed to set FUNCTION_TARGET: %v\n for local dev server", err) + // } + // Use PORT environment variable, or default to 8080. port := "8080" if envPort := os.Getenv("PORT"); envPort != "" { From 43270dcbb8e43f0ee1228d27172505784ae338c8 Mon Sep 17 00:00:00 2001 From: Gregory Gaines Date: Sun, 6 Apr 2025 14:17:16 -0400 Subject: [PATCH 2/5] chore: Fix readme quickstart formatting --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 201fd7f..a6535ba 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,18 @@ handling logic. ) func main() { - // Normally, you should start the local development server from the command - // line, but certain IDE's like Intellij and VSCode support directly running - // go applications inside the IDE directly. In these cases, the function won't - // be recognized. In these cases, set the "FUNCTION_TARGET" env variable directly - // to ensure the function is registered for the local server. - // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") - // if err != nil { - // log.Fatalf("failed to set FUNCTION_TARGET: %v\n for local dev server", err) - // } + // Normally, you should start the local development server from the command + // line, but certain IDE's like Intellij and VSCode support directly running + // go applications inside the IDE directly. In these cases, the function won't + // be recognized. + // + // In these cases, set the "FUNCTION_TARGET" env variable directly + // to ensure the function is registered for the local server. + // + // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") + // if err != nil { + // log.Fatalf("failed to set FUNCTION_TARGET: %v\n for local dev server", err) + // } // Use PORT environment variable, or default to 8080. port := "8080" From 531b0026ce366989e13d94c7a6fb6c41277360e2 Mon Sep 17 00:00:00 2001 From: Gregory Gaines Date: Sun, 6 Apr 2025 22:47:08 -0400 Subject: [PATCH 3/5] chore: More formatting --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a6535ba..aa09b43 100644 --- a/README.md +++ b/README.md @@ -100,11 +100,10 @@ handling logic. func main() { // Normally, you should start the local development server from the command // line, but certain IDE's like Intellij and VSCode support directly running - // go applications inside the IDE directly. In these cases, the function won't - // be recognized. + // go applications from the IDE. In these cases, the function won't be recognized. // - // In these cases, set the "FUNCTION_TARGET" env variable directly - // to ensure the function is registered for the local server. + // To resolve, set the "FUNCTION_TARGET" env variable directly to ensure the + // function is registered for the local server. // // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") // if err != nil { From b12d287e6e713b1e673a0b23408b539b546d363e Mon Sep 17 00:00:00 2001 From: Gregory Gaines Date: Sun, 6 Apr 2025 23:07:38 -0400 Subject: [PATCH 4/5] chore: Update wording --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa09b43..f97b135 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ handling logic. ) func main() { - // Normally, you should start the local development server from the command - // line, but certain IDE's like Intellij and VSCode support directly running - // go applications from the IDE. In these cases, the function won't be recognized. + // The local development server is normally started from the command line, but + // certain IDE's support directly running go applications from the IDE. In these + // cases, the function won't be recognized. // // To resolve, set the "FUNCTION_TARGET" env variable directly to ensure the // function is registered for the local server. From 7514911c47479781c5264307f0fcfada63b9dde0 Mon Sep 17 00:00:00 2001 From: Gregory Gaines Date: Fri, 23 May 2025 07:59:55 +0000 Subject: [PATCH 5/5] Update formatting --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f97b135..8d1d54b 100644 --- a/README.md +++ b/README.md @@ -98,17 +98,17 @@ handling logic. ) func main() { - // The local development server is normally started from the command line, but - // certain IDE's support directly running go applications from the IDE. In these - // cases, the function won't be recognized. - // - // To resolve, set the "FUNCTION_TARGET" env variable directly to ensure the - // function is registered for the local server. - // - // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") - // if err != nil { - // log.Fatalf("failed to set FUNCTION_TARGET: %v\n for local dev server", err) - // } + // The local development server is normally started from the command line, but + // certain IDE's support directly running go applications and the function won't + // be recognized. + // + // To resolve, set the "FUNCTION_TARGET" env variable directly to ensure the + // function is registered for the local server. + // + // err := os.Setenv("FUNCTION_TARGET", "HelloWorld") + // if err != nil { + // log.Fatalf("failed to set FUNCTION_TARGET: %v\n for local dev server", err) + // } // Use PORT environment variable, or default to 8080. port := "8080"