How does the freeCodeCamp challenge check my package.json?

Hey everyone!

I just started with the APIs and Microservices curriculum and the first challenge is to add an author to the package.json. I used replit, modified the package.json, started the app in replit and copied the link into the challenge to complete the task.

Everything worked fine but I am trying to understand how the challenge verified, that I added the author. All it has is the URL to my app (npm.username.repl.co) which shows the index.html page. How did the challenge access the package.json file in my project?

The code is actually in your project in server.js, about half-way down, in the route app.route('/_api/package.json'). That’s some express code to read the local package.json and serve it out at /_api/package.json on whatever your project URL is.

You can navigate to that URL and see the output yourself if you like.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.