From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create an endpoint to create listings

Create an endpoint to create listings

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Create an endpoint to create listings

- [Instructor] Okay. The next route we're going to create, is the route that will allow users to create new listings. And this will be hit when the user fills out the form and hits the create button on the new listing page. So the first thing we have to do here is install a package called UUID. We'll be using this package in our route to generate random, unique IDs for the new listings that users create. So we're going to say NPM install, UUID and hit enter. And just a note about this package, depending on the version of NOJS you're using on your computer, this package may throw a weird error for you when you try and use it on our server. In particular version 13.5, which is the version I showed you that I was using back at the beginning of the course was causing problems for me so I had to switch back to using version 12.18 here. And keep in mind that the latest versions of Node would probably work as well, but just so you…

Contents