From the course: JavaScript Code Challenges: Creating Web Apps
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Final touches - JavaScript Tutorial
From the course: JavaScript Code Challenges: Creating Web Apps
Final touches
- [Instructor] All right, our application tracker is working, but it has some room for improvement, so let's clean it up. Let's start in server.js. It's quite all right, but there are some things I would like to see improved. First of all, I want some error handling on my readJobs, like this. And I can actually do the same thing for the writeJobs. I can add error handling to this too. For now, copy this. And then on here, just going to say error writing jobs file. Okay, so we have some error handling in place. Other things we could include would be some validation in the post, for example. And also, using the Date.now for an id is not recommended in production, but I'll leave it for now. Let's go ahead and make some improvements to our frontend. So first of all, you would want to wrap the fetch in a try-catch, so let's go ahead and change that. So staying mostly the same, just adding a little bit of error handling and a message for displaying that we could not load jobs if that…
Contents
-
-
-
-
-
-
(Locked)
Introduction: Job application tracker1m 3s
-
(Locked)
Planning the features52s
-
(Locked)
Overview of the necessary JavaScript concepts4m 6s
-
(Locked)
Creating the backend with Node.js and Express.js4m 19s
-
(Locked)
Test the backend1m 55s
-
Create the job list5m 5s
-
(Locked)
Create the form for adding jobs1m 15s
-
(Locked)
Final touches2m 53s
-
(Locked)
Challenge: Adding job favorites35s
-
(Locked)
Solution: Adding job favorites1m 37s
-
(Locked)
-
-