Local listen
Your app listens on
AWS_LAMBDA_HTTP_ENDPOINTEnvironment variable host:port that your HTTP server must listen on. Lambda sets it in the cloud; set it yourself for local runs (for example 127.0.0.1:3000).
(host:port). Locally you set it; on Lambda, Lambda sets it. Same listen code
either way.
Run the demo
Section titled “Run the demo”From the repo root:
cd demonpm installadded 65 packages, and audited 66 packages in 1sAWS_LAMBDA_HTTP_ENDPOINT=127.0.0.1:3000 npm start> wf-hello-demo@1.0.0 start> node index.js
Server listening on 127.0.0.1:3000Leave that process running. In another terminal:
curl http://127.0.0.1:3000/{"message":"Hello from Lambda Web Functions!","path":"/"}curl http://127.0.0.1:3000/health{"status":"healthy"}Any server that binds AWS_LAMBDA_HTTP_ENDPOINT works — including the console
Hello World template later.