3 ms·
* Disclosure: I work for Serverless, Inc. > it was relatively easy for me to write a really simple Express server, transform the Express requests into the API
by abd12 9y ago
* Disclosure: I work for Serverless, Inc.
> it was relatively easy for me to write a really simple Express server, transform the Express requests into the API Gateway format, and convert the API Gateway response format back into Express format.
For those interested in this route, there's a plugin[0] for the Serverless Framework that handles this conversion for you. Honestly takes 1 minute to convert an existing Express app to serverless.
Shameless plug but I wrote a blog post walkthrough for anyone interested --> https://serverless.com/blog/serverless-express-rest-api/ https://serverless.com/blog/serverless-express-rest-api/
[0] - https://github.com/dougmoscrop/serverless-http https://github.com/dougmoscrop/serverless-http
- Blackstone4 9y agoIf you need to make a disclosure, please could you do it at the start of your statement. That way the user has context on what you write :)
- abd12 9y agoNoted and updated! Thanks for the tip.
- Vinnl 9y agoIf you want to use Serverless (the package, not the architecture) and are converting an existing Express app, that might indeed be a good idea. I was greenfielding, and neither of these conditions were true for me.