lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

use Lambda-api as a web framework

Open niezw opened this issue 1 year ago • 2 comments

Is there a way to use Lambda-api as a web framework?

niezw avatar May 15 '24 08:05 niezw

Hey @niezw, what do you mean? in what sense?

naorpeled avatar May 15 '24 13:05 naorpeled

Hey @niezw, what do you mean? in what sense?

Hi @naorpeled ,Thank you for your reply.

I run my programs on AWS Lambda, I use lambda-api and I think it's a great product, lightweight and fast. I don't like too many dependencies like “Express.js, Fastify, Koa, Restify”;

However, now I need to migrate Lambda to ECS, I need to make changes, but I still want to base on lambda-api, because it is light enough and less dependencies!

So I want to make sure that there is an easy way to make some changes to be able to listen on a port and serve http on that port like Express.js does!

niezw avatar May 16 '24 02:05 niezw

Hey @niezw, what do you mean? in what sense?

Hi @naorpeled ,Thank you for your reply.

I run my programs on AWS Lambda, I use lambda-api and I think it's a great product, lightweight and fast. I don't like too many dependencies like “Express.js, Fastify, Koa, Restify”;

However, now I need to migrate Lambda to ECS, I need to make changes, but I still want to base on lambda-api, because it is light enough and less dependencies!

So I want to make sure that there is an easy way to make some changes to be able to listen on a port and serve http on that port like Express.js does!

First of all, I'm glad you find this library great 🙏

I see, honestly this isn't really a part of the scope of this library. I guess you can create a Node HTTP server using the http module, use api.run with the request data mapped to the fields we expect. Makes sense?

BTW, I'll be closing this issue as not planned but feel free to reach out on Twitter or ping me here if you have more questions 🙏

naorpeled avatar May 18 '24 21:05 naorpeled