我是否应该通过Sveltekit端点,NetLify函数或NetLify Edge运行电子邮件调度代码?
我有一个订单页面,我在Sveltekit Endpoint中通过Post requestHandler来处理表单(代码示例)。到目前为止,此终点主要负责通过Sanity Client API坚持提交的数据。
现在,我想在数据持续存在后派遣电子邮件确认(SendGrid)。我很难决定直接在Sveltekit端点还是在NetLify函数中做到这一点。
在回答原始问题(标题中)时,还请帮助我澄清:
- 是否
@sveltejs/Adapter-netlify
实际上使用NetLify函数运行Sveltekit端点(默认情况下)使用NetLify函数列出它们:list
或使用netlify函数执行它们:Indoke Endpoint
) - 哪种情况可能更适合一个或另一个方案
- ,无论是较新类型的< a href =“ https://www.netlify.com/products/dedge/” rel =“ nofollow noreferrer”> netlify edge 功能特别适合此用例。
多谢!
I have an order page for which I handle form submission via a POST RequestHandler in a SvelteKit endpoint (code example). This endpoint is, so far, mostly in charge of persisting the submitted data via the Sanity Client API.
Now, I want to dispatch email confirmations (Sendgrid in my case) after the data gets persisted. I'm having a hard time deciding whether I should do that directly in the SvelteKit endpoint, or in a Netlify function.
While answering the original question (in title), please also help me clarify:
- whether
@sveltejs/adapter-netlify
actually runs SvelteKit endpoints using Netlify functions by default (and, if so, why I can't list them withnetlify functions:list
or execute them withnetlify functions:invoke endpoint
) - which scenario might be a better fit for the one or the other
- whether the newer type of Netlify Edge functions specifically fit this use case or not.
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论