Skip to content

Conversation

@es02
Copy link

@es02 es02 commented Dec 14, 2019

Expected Behavior

The script should output "Hello Joe Bloggs"

Actual Behavior

The script outputs "Hello undefined"

Steps to Reproduce the Problem

  1. Git clone express-sample
  2. Run npm/yarn install
  3. Start node server with "node main.js"
  4. test url in browser at http://localhost:3000/

Proposed Changes

  • moves response sending into getUserName lambda function so response var is available to sending call
  • changes to async/await to ensure name is picked up before returning data to client
  • changes function-level const to let and adds semi-colons for code-standards compliance

Specifications

  • Version: master
  • Platform: Reproduced under Chromium/Chrome and Firefox (Manjaro x64 kernel 5.4.2-1)

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