Documentation nit: Serverless functions
See original GitHub issueA question I kinda wanted https://redwoodjs.com/docs/serverless-functions to answer: Why do the generated files from the serverless generator seem to tie to aws?
( I think I know the answer is that in general aws-lambda’s API style must be the default for many other cloud providers but it wasn’t on vercel + next’s nor azure’s which I at least have some experience with. Figured the docs would have the answer there. )
Related, perhaps yarn rw g functions
can check for @types/aws-lambda
in node_modules and recommend it when in TypeScript mode? The IDE doesn’t show errors that it’s missing (it just any
’d) and installing aws-lambda
doesn’t include those types (because it’s a different module). Ideally Redwood could inline the APIGatewayEvent
types into @redwoodjs/api/webhooks
instead then use those.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
That’s an interesting thought. 🤔
It does!
yarn rw setup generator function
will give you the template and can change up whatever you want. Are you thinking that if youyarn rw setup deploy
that it might also runyarn rw setup template function --vercel
or something similar, so that any future functions you generate will use a template customized for that host?It doesn’t currently have the ability to pass flags and select from other templates, but I don’t see why it couldn’t…