TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A 7KB AWS lambda Node.js library with zero runtime dependencies

123 点作者 albertgao超过 5 年前

6 条评论

s_Hogg超过 5 年前
Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
评论 #22334820 未加载
评论 #22335831 未加载
评论 #22334569 未加载
评论 #22335415 未加载
评论 #22335168 未加载
评论 #22335102 未加载
评论 #22334725 未加载
评论 #22334511 未加载
评论 #22335688 未加载
评论 #22338772 未加载
评论 #22337302 未加载
评论 #22338990 未加载
评论 #22339196 未加载
rebolyte超过 5 年前
If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;middyjs&#x2F;middy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;middyjs&#x2F;middy</a>
评论 #22339329 未加载
ilaksh超过 5 年前
I&#x27;m sorry but why can&#x27;t you just call a few functions in your normal handler and then just return the normal type of object that Lambda wants?<p>This all seems to be pretty useless indirection to me.
评论 #22386866 未加载
616c超过 5 年前
It wasn&#x27;t obvious so I checked: zero runtime since it typescript and the @types&#x2F;aws-lambda stuff is not needed in resulting compiled JS. Still I&#x27;m not sure what this does beyond until functions for events you receive in Lambda and have to parse raw yourself?
评论 #22335627 未加载
fibo超过 5 年前
I created and use this tiny helper: <a href="http:&#x2F;&#x2F;g14n.info&#x2F;aws-lambda-res&#x2F;" rel="nofollow">http:&#x2F;&#x2F;g14n.info&#x2F;aws-lambda-res&#x2F;</a><p>I think it is far enough for my needs, it is nice to use no framework other than the one provided by AWS.
makstaks超过 5 年前
Thank you for this library, I am looking forward to reviewing your work. I didn&#x27;t want to use a framework (like hapi or express) to achieve something similar.