No, it’s not necessarily on the fCC side (it’s not in this case, as my project is working against the current tests, from repl.it, right now).
undefined here, something is swallowing it somewhere, especially if you are trying to validate it. You really need to log the inputs to the routes as early as possible and then log all the responses from the routes right before sending the response and make sure that everything is as you expect. If logging your route inputs in the router is not helping, back up and add a root level logger to
server.js (there is a challenge about this) to log all the route inputs to make sure you are getting the inputs and nothing is happening to them. I did this on my working project and all the inputs are as expected. When I did it on your project, the tests did not send a number on the
/api/shorturl/:id GET, but the test should be getting that number from your JSON response. Logging your
counter variable in
/api/shorturl/new should be helpful.
You may also have a problem with your CORS setup. I’m not sure what the default is using
app.use(cors()); as you have, but you need to allow all hosts to see your API if that doesn’t already do so.