[Fixes #2557] nicer error message if someone creates server/index.js and it doesn’t export a function