Tell us what’s happening:
The example of the exercise does not work, and when a tried to use the glitch page for this test all the singular tests go out cause time out. I think the server is not working!
Please help, I want to finish it
Your code so far
I can create a user by posting form data username to /api/exercise/new-user and returned will be an object with username and _id. (Test timed out) I can get an array of all users by getting api/exercise/users with the same info as when creating a user. I can add an exercise to any user by posting form data userId(_id), description, duration, and optionally date to /api/exercise/add. If no date supplied it will use current date. App will return the user object with the exercise fields added. (Test timed out) I can retrieve a full exercise log of any user by getting /api/exercise/log with a parameter of userId(_id). App will return the user object with added array log and count (total exercise count). (Test timed out) I can retrieve part of the log of any user by also passing along optional parameters of from & to or limit. (Date format yyyy-mm-dd, limit = int) (Test timed out)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36.
In this one I only put the first part, for the search to somebody, if you see when submit is pulsed the system does not work, but I don’t get any error either.
Hey, I think the issue was with your mongoose/mongodb connection. A way to check this is when listening, you can do console.log(mongoose.connection.readyState), and yours came up as 0, which meant disconnected.
I managed to get it to connect by making some changes:
Firstly, you need to update your package versions, change your package.json dependencies to this: