Here’s an example of exposing an Express app in a Lambda (actually, the same code can deploy on both AWS and Azure).
https://github.com/pulumi/examples/blob/master/cloud-js-httpserver/index.js
This should generalize to any Express app.
You can also deploy the Express app as a container and run in Fargate or Kubernetes with Pulumi - so depends a bit on what your goal is.
i
incalculable-oil-55773
02/28/2019, 6:50 AM
That's sort of what I mean - I can do that, but I need to build something more complex.
incalculable-oil-55773
02/28/2019, 6:50 AM
Specifically, I want to build a small express app with two or three endpoints, where each endpoint needs to make an API call and then render the result with a view template.
incalculable-oil-55773
02/28/2019, 6:51 AM
I'm not sure that's a use-case that's catered for.
incalculable-oil-55773
02/28/2019, 7:06 AM
Certainly not by the cloud.httpserver 'cos I'm going to need a build process to precompile the templates, and importing shared code gets hairy because the serialisation is deep magic.