Run Node.js web applications and APIs using existing application frameworks on AWS #serverless technologies such as Lambda, API Gateway, Lambda@Edge, and ALB.
nodejs
aws
lambda
express
node
aws-lambda
serverless
api-gateway
dynamodb
expressjs
sam
serverless-framework
node-js
alb
express-js
aws-serverless
hacktoberfest
serverless-applications
serverless-express
vendia
-
Updated
Oct 28, 2021 - JavaScript
Describe the bug
When an optional route param (i.e.
/foo/:bar?
) is not supplied for a particular request, thereq.params
object will still contain it, with a string value of"undefined"
.This would mean that i.e.
if (req.params.bar)
would unexpectedly always be truthy, even when the param was not supplied.To Reproduce
Simple app with optional route param
bar
: