Seems like your tutorial code has some errors?
Can't see where shop is defined, and there's a missing comma after
The linked Github file is also from the previous tutorials.
Go to the solution
This is an accepted solution.
Have a look at the full file: https://github.com/Shopify/shopify-demo-app-node-react/blob/master/server.js#L38
Shop is assigned as a const at line 38. It is a destructuring assignment.