Skip to content

docs(aws-node-express-web-app): add live test and bring README to the example standard - #839

Merged
czubocha merged 2 commits into
v4from
branch/dreamy-lamport-709whe-webapp
Nov 25, 2026
Merged

czubocha merged 2 commits into
v4from
branch/dreamy-lamport-709whe-webapp

Conversation

@czubocha

Copy link
Copy Markdown
Contributor

Lesson

An unchanged Express server runs on AWS Lambda Web Functions with one webApps entry (entry: src/server.js): no handler, no adapter, and the same file runs locally with npm start.

Left out on purpose: custom domains, IAM-authorized endpoints, TypeScript and esbuild, VPC access, environment variables and Dev Mode. The docs page and the Next steps links cover them; the Next.js and custom-domain examples stay separate examples.

Changes

  • example.json (new): manifest with the title and description the gallery already shows, and a fast live test: an http check that requests /hello/serverless on the stack output ApiWebFunctionUrl and expects status 200 and Hello, serverless!, text only this server's route returns.
  • README.md: restructured into the standard sections (What it deploys, Prerequisites, Deploy, Try it, How it works, Cost and cleanup, Next steps); absolute links; output pasted from a run with Framework 4.47.0; Try it runs the same request the check asserts; Cost names what is billed, with pricing links. Frontmatter and badge line regenerated by npm run docs.
  • package.json / package-lock.json: express pinned to 5.3.0, the current release (the checker's exact-version rule). The refreshed lockfile resolves current releases of body-parser and qs; npm audit reports 0 vulnerabilities.

serverless.yml and src/server.js are unchanged. The example is not an onboarding example.

Test plan

us-east-1, Framework 4.47.0.

  • Live test: PASS aws-node-express-web-app 4.47.0 94s (stage exnvjnml8ib), and again on the final files: PASS aws-node-express-web-app 4.47.0 90s (stage exo1y74nj70).
  • Negative control (scratch copy, contains changed to Hello, not-serverless!): FAIL zz-neg-web 4.47.0 180s at the check step, expected status 200 and a body containing "Hello, not-serverless!"; ... the last response was status 200, body "{\"message\":\"Hello, serverless!\"}".
  • README followed by hand from a clean copy: npm install, serverless deploy, curl on all three routes, serverless invoke --web-app api --path /hello/serverless, serverless info --verbose (shows ApiWebFunctionUrl), serverless logs --web-app api, serverless remove. All matched the README.
  • Fresh-agent test: an agent given only the README deployed the example, ran Try it (all three routes answered 200 with the README's bodies; serverless invoke --web-app api printed HTTP 200 OK and {"message":"Hello, serverless!"}), removed it and confirmed the stack was gone.
  • Nothing left after the runs: no stack, log group, IAM role or web function from the example.
  • npm test (323 pass), npm run validate (0 errors), npm run check-docs, node scripts/check-examples.mjs aws-node-express-web-app --package clean; npm audit: 0 vulnerabilities.

Generated by Claude Code

… example standard

Add example.json with an http check on the ApiWebFunctionUrl output, restructure the README into the standard sections with output from a real run, and pin express to 5.3.0.
@czubocha
czubocha merged commit 7937408 into v4 Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant