You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you deploy a function for the first time that does not have a config you get the following confusing prompt asking for a "path to your Function's entrypoint"
The following is my first experience doing this and you can see my confusion:
$ ~/Projects/lagon-hello-world$ lagon deploy hello.ts
No configuration found in current directory...
? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world/hello.ts"): y
✖ "hello.ts/hello.ts/y" is not a file
$ ~/Projects/lagon-hello-world$ lagon deploy hello.ts
No configuration found in current directory...
? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world/hello.ts"): .
✖ "hello.ts/hello.ts/." is not a file
$ ~/Projects/lagon-hello-world$ lagon deploy .
No configuration found in current directory...
? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world"): hello.ts
I used lagon deploy hello.ts because this is what the getting started docs say to do here.
Secondly, I was not sure what was meant by entrypoint. It made me think of docker. The getting started docs do not mention such a word either so I couldn't read the docs for that.
I think the CLI can also do more inference. If there is only 1 file it can just ask to confirm if that file is your function's entrypoint". If there's an index.ts it can also be assumed to be the entrypoint.
Otherwise, clarifying what the CLI wants is helpful too. I wasn't sure if it wanted a file path or a yes or no answer.
The text was updated successfully, but these errors were encountered:
This is definitely a bug: specifying a path to a file should work without asking the user for a full configuration, as shown in the docs.
Secondly, I was not sure what was meant by entrypoint. It made me think of docker. The getting started docs do not mention such a word either so I couldn't read the docs for that.
Agree, the getting started docs weren't updated after #604 was merged. This will be updated soon!
Otherwise, clarifying what the CLI wants is helpful too. I wasn't sure if it wanted a file path or a yes or no answer.
Does something like "Specify the path to your Function's entrypoint" works better?
When you deploy a function for the first time that does not have a config you get the following confusing prompt asking for a "path to your Function's entrypoint"
The following is my first experience doing this and you can see my confusion:
I used
lagon deploy hello.ts
because this is what the getting started docs say to do here.Secondly, I was not sure what was meant by entrypoint. It made me think of docker. The getting started docs do not mention such a word either so I couldn't read the docs for that.
I think the CLI can also do more inference. If there is only 1 file it can just ask to confirm if that file is your function's entrypoint". If there's an index.ts it can also be assumed to be the entrypoint.
Otherwise, clarifying what the CLI wants is helpful too. I wasn't sure if it wanted a file path or a yes or no answer.
The text was updated successfully, but these errors were encountered: