examples
examples copied to clipboard
fix: move aws-nodejs-typescript to main list
Hello !
I was recently looking for the aws-nodejs-typescript
template on the serverless/serverless
repository and couldn't find it. It appeared that it was moved out in and https://github.com/serverless/serverless/pull/10576 here in https://github.com/serverless/examples/pull/677.
However, this template was being actively maintained, and is still one of the only templates to have been migrated to Serverless v3. This PR will move it in the main folder and add it as a suggestion for the serverless
create wizard.
Let me know what you think :wink:
@fredericbarthelet @adriencaccia
Also check out https://github.com/serverless/serverless/issues/10700
Thanks a lot for raising that @fargito. To provide more explanation - the legacy
dir is currently for templates that are being used with serverless create
command. We are currently in the process of consolidating the whole onboarding process under the serverless
command (also in noninteractive fashion). In order for this template to still be recognized as previously with serverless create -t
, it will need to stay under the legacy
dir.
As for adding it to the list in serverless
interactive wizard - let's continue that discussion in the corresponding issue in Framework repo - we would like to have more examples there, but we need to add it in structured manner.
👍 to provide more context, I talked with Frédéric earlier this week: indeed we want that TypeScript template outside of the "legacy" templates because it is a maintained template that provides great value.
However we cannot remove it from legacy, else it will break sls create
commands.
What would make sense is to duplicate it at the root, and maintain the template at the root. Then it should be installed via sls --template-url=<url>
. The old version (used with the create
command) can then be ignored.
Does that make sense?
And also, yeah then we can discuss separately the inclusion of TypeScript in the sls
template list. What I said to Frédéric is basically along those lines: the template you are maintaining is awesome, but it is advanced. We also need a default "starter TypeScript template" that doesn't use serverless.ts
and contains minimal stuff (like other NodeJS templates). I think your template would be better named something like aws-nodejs-typescript-advanced
or something that signals this is an "advanced" template.
Yes, that does make sense 👍 The only confusion might be around the fact that create
will use the outdated version. Alternatively, we can "mirror" the template under root with the one under legacy
dir.
Given that, @fargito, would you be able to duplicate the template instead of moving it from legacy
dir?
And also, yeah then we can discuss separately the inclusion of TypeScript in the sls template list. What I said to Frédéric is basically along those lines: the template you are maintaining is awesome, but it is advanced. We also need a default "starter TypeScript template" that doesn't use serverless.ts and contains minimal stuff (like other NodeJS templates). I think your template would be better named something like aws-nodejs-typescript-advanced or something that signals this is an "advanced" template.
Agreed - the current TypeScript template is great, but it's more advanced than our current started templates and might be a bit overwhelming for people just starting out - I think we should have something more barebones as a started template(s) for TypeScript
Hello @pgrzesik @mnapoli it makes sense to indicate the fact that this template is advanced. Do you think moving the template to the main folder and then symlinking it into the legacy
folder would work?
Hey @fargito - honestly I'm not sure if that's going to be working without issues - we can try it and if that doesn't work, I'll duplicate the contents.
FYI I've opened #685 for the very basic TypeScript example (as mentioned in my comment above).