I have tried the tutorial the other day, and the json server was working. The CRUD functions also work and reflects on the web app. However, today when I re-opened the Angular application to refresh the lessons, I ran
ng serve
to run the application and I noticed that the tasks are empty on the webpage. When I checked the error messages on the browser console, I got the error message/s:
zone.js:2707 GET http://localhost:5000/tasks net::ERR_CONNECTION_REFUSED
and
ERROR: HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: 'Unknown Error', url: 'http://localhost:5000/tasks', ok: false, …}
'error: ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: 'error', …} headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, headers: Map(0)} message: "Http failure response for http://localhost:5000/tasks: 0 Unknown Error" name: "HttpErrorResponse" ok: false status: 0 statusText: "Unknown Error" url: "http://localhost:5000/tasks" [[Prototype]]: HttpResponseBase constructor: class HttpErrorResponse [[Prototype]]: Object
Is this a problem regarding the json server? I've tried reinstalling them to the package but it still has the same error.