NetLify Svelte端点的实现 /托管(aws?)

发布于 2025-02-12 18:06:13 字数 437 浏览 1 评论 0原文

我已经使用Sveltekit的端点实现设置了一个休息端点(简单的HTTP GET)。当它在我的计算机上运行时,它在“ NPM Run Dev”模式下工作,但是某些请求在NetLify上托管时会出现错误。特定错误消息很简单:

{“ errormessage”:“响应有效载荷大小超过最大允许的有效负载大小(6291556字节)。

通过分开和分页结果。

我的问题是:netlify是否使用AWS lambda可以托管汇编的Svelte端点,即使我不明确使用Netlify的无服务器功能

我之所以问,是因为搜索此错误消息给出了有关NetLify/aws lambda的结果,我很想知道是否有人知道NetLify如何在幕后处理这些Svelte端点。看起来他们确实将它们捆绑到AWS lambda功能中(他们已经广告宣传了他们为自己的NetLify功能使用的)。

I have set up a REST endpoint (simple http GET) using Sveltekit's endpoints implementation. It works in 'npm run dev' mode when it's running on my computer, but certain requests give errors when hosted on Netlify. The specific error message is straightforward:

{"errorMessage":"Response payload size exceeded maximum allowed payload size (6291556 bytes).","errorType":"Function.ResponseSizeTooLarge"}

I know I can fix this by splitting up and paging results.

My question is: Does Netlify use AWS Lambda to host the compiled Svelte endpoints even if I don't use Netlify's serverless functions explicitly?

I ask because searching this error message gives results about Netlify/AWS lambda, and I'm just curious to know if anyone knows concretely how Netlify handles these svelte endpoints behind the scenes. It really looks like they bundle them into AWS Lambda functions (which they already advertise they are using for their own Netlify functions).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情话已封尘 2025-02-19 18:06:13

Svelte使用@sveltejs/adapter-netlify under-the-hood: https://www.npmjs.com/package/@sveltejs/adapter-netlify 工作。该软件包生成了一个名为Render的NETLIFY函数,该函数处理您的Svelte应用程序的服务器端渲染。

因此,要回答您的问题,是的,您正在使用项目中的NetLify功能 - 不是您自己,但是您的框架是为您做的。

Svelte uses @sveltejs/adapter-netlify under-the-hood: https://www.npmjs.com/package/@sveltejs/adapter-netlify to work on Netlify. This package generates a Netlify Function named render which handles the Server Side Rendering of your Svelte application.

So to answer your question, yes, you're using Netlify Functions in your project - not yourself, but your framework is doing that for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文