Repository navigation
docs(aws-node-express-web-app): add live test and bring README to the example standard - #839
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lesson
An unchanged Express server runs on AWS Lambda Web Functions with one
webAppsentry (entry: src/server.js): no handler, no adapter, and the same file runs locally withnpm 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 afastlive test: anhttpcheck that requests/hello/serverlesson the stack outputApiWebFunctionUrland expects status 200 andHello, 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 bynpm run docs.package.json/package-lock.json:expresspinned to5.3.0, the current release (the checker'sexact-versionrule). The refreshed lockfile resolves current releases ofbody-parserandqs;npm auditreports 0 vulnerabilities.serverless.ymlandsrc/server.jsare unchanged. The example is not an onboarding example.Test plan
us-east-1, Framework 4.47.0.PASS aws-node-express-web-app 4.47.0 94s(stageexnvjnml8ib), and again on the final files:PASS aws-node-express-web-app 4.47.0 90s(stageexo1y74nj70).containschanged toHello, not-serverless!):FAIL zz-neg-web 4.47.0 180sat thecheckstep,expected status 200 and a body containing "Hello, not-serverless!"; ... the last response was status 200, body "{\"message\":\"Hello, serverless!\"}".npm install,serverless deploy,curlon all three routes,serverless invoke --web-app api --path /hello/serverless,serverless info --verbose(showsApiWebFunctionUrl),serverless logs --web-app api,serverless remove. All matched the README.serverless invoke --web-app apiprintedHTTP 200 OKand{"message":"Hello, serverless!"}), removed it and confirmed the stack was gone.npm test(323 pass),npm run validate(0 errors),npm run check-docs,node scripts/check-examples.mjs aws-node-express-web-app --packageclean;npm audit: 0 vulnerabilities.Generated by Claude Code