Saturday, 2 June 2018

node frameworks alongside serverless framework?

Hey all, I wanted to get a pulse of how people are tackling serverless architecture and serverless framework with node (if you are at all...).I'm playing around with building a serverless rest api (using this example), but I'm not sure how to organize my endpoints/resources. The way this example is laid out, each operation on each resource would have its own function in lambda. Seems like it might get out of control pretty quickly if you have a couple different resources defined in a rest service.this doc describes how you can extract functions out of the main serverless.yml file so at least that file is a little easier to work with, but you still generate a new function for each method.finally, there are examples which use serverless-http middleware with a node framework like express to handle routing, which leads to only one lambda function, but would this lead to lower performance compared to the other options? this approach seems the easiest for converting an existing server-based application to serverless, but is it less than ideal for starting from scratch?any thoughts/discussion on the tech/pros/cons are welcome!

Submitted June 02, 2018 at 06:09AM by warpedspoon

No comments:

Post a Comment