Skip to content

Commit 61cb56a

Browse files
authored
feat: change default runtime to Node.js HTTP (#198)
Fixes: #191 Signed-off-by: Lance Ball <lball@redhat.com>
1 parent d59af67 commit 61cb56a

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
const (
1414
DefaultRegistry = "docker.io"
15-
DefaultRuntime = "go"
15+
DefaultRuntime = "node"
1616
DefaultTrigger = "http"
1717
)
1818

client_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ func TestExtensibleTemplates(t *testing.T) {
176176
t.Fatal(err)
177177
}
178178

179-
// Ensure that a file from that only exists in that template set was actually written 'json.go'
180-
if _, err := os.Stat(filepath.Join(root, "json.go")); os.IsNotExist(err) {
181-
t.Fatalf("Initializing a custom did not result in json.go being written to '%v'", root)
179+
// Ensure that a file from that only exists in that template set was actually written 'json.js'
180+
if _, err := os.Stat(filepath.Join(root, "json.js")); os.IsNotExist(err) {
181+
t.Fatalf("Initializing a custom did not result in json.js being written to '%v'", root)
182182
} else if err != nil {
183183
t.Fatal(err)
184184
}

cmd/init.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
func init() {
1515
root.AddCommand(initCmd)
1616
initCmd.Flags().BoolP("confirm", "c", false, "Prompt to confirm all configuration options - $FAAS_CONFIRM")
17-
initCmd.Flags().StringP("runtime", "l", faas.DefaultRuntime, "Function runtime language/framework. Default runtime is 'go'. Available runtimes: 'node', 'quarkus' and 'go'. - $FAAS_RUNTIME")
17+
initCmd.Flags().StringP("runtime", "l", faas.DefaultRuntime, "Function runtime language/framework. Default runtime is 'node'. Available runtimes: 'node', 'quarkus' and 'go'. - $FAAS_RUNTIME")
1818
initCmd.Flags().StringP("templates", "", filepath.Join(configPath(), "templates"), "Extensible templates path. - $FAAS_TEMPLATES")
1919
initCmd.Flags().StringP("trigger", "t", faas.DefaultTrigger, "Function trigger. Default trigger is 'http'. Available triggers: 'http' and 'events' - $FAAS_TRIGGER")
2020

@@ -31,9 +31,9 @@ var initCmd = &cobra.Command{
3131
Creates a new Function project at <path>. If <path> does not exist, it is
3232
created. The Function name is the name of the leaf directory at <path>.
3333
34-
A project for a Go Function will be created by default. Specify an alternate
35-
runtime with the --language or -l flag. Available alternates are "node" and
36-
"quarkus".
34+
A project for a Node.js Function will be created by default. Specify an
35+
alternate runtime with the --language or -l flag. Available alternates are
36+
"quarkus" and "go".
3737
3838
Use the --trigger or -t flag to specify the function invocation context.
3939
By default, the trigger is "http". To create a Function for CloudEvents, use

0 commit comments

Comments
 (0)