serverless-nextjs / serverless-next.js

⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
MIT License
4.44k stars 451 forks source link

Example: app-with-custom-lambda-handler - What's purpose? #168

Closed Vadorequest closed 4 years ago

Vadorequest commented 4 years ago

https://github.com/danielcondemarin/serverless-next.js/blob/master/examples/app-with-custom-lambda-handler/serverless.yml

Is that an example on how to do a Next.js app powered by one lambda? I thought the benefits of using the Next.js serverless mode was to use one lambda per endpoint. I do not understand what's the benefits of using this approach. Could you explain/document it a bit more? At least so that anyone can understand the use case of each example :)

Vadorequest commented 4 years ago

Does the doc from the plugin applies to the component as well? There is little documentation regarding the options of the SLS Component, but I found more doc regarding the (now deprecated- plugin at https://github.com/danielcondemarin/serverless-next.js/blob/4214f00648406f5840c9e451d6b6df8a43fa17da/packages/serverless-nextjs-plugin/README.md#custom-lambda-handler

I'm just getting started with the component, never used the plugin, and kinda lost in the documentation. The examples are a good thing! They should be made more obvious on the README page to help people get started with a boilerplate. ;)

Vadorequest commented 4 years ago

Okay, closing this, this example is featuring the plugin, not the component.