jeremydaly / lambda-api

Lightweight web framework for your serverless applications
https://serverless-api.com
MIT License
1.41k stars 125 forks source link

use Lambda-api as a web framework for ECS #268

Closed niezw closed 1 month ago

niezw commented 1 month ago

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

naorpeled commented 1 month ago

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

niezw commented 1 month ago

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!

naorpeled commented 1 month ago

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 🙏