In this video, learn how to create a mockup data.json file from a JSON generator, and then how to drop the file into the project and import it into index.js.
- So, we have some data to play with in our application.…I want to show you a neat website I use, from time to time,…to generate mock JSON data for me.…And then, we'll load this data into our server.…So, go to www.mockaroo.com,…and once you get to this website you'll, basically,…see how easy it is to create mock data.…So, basically, what you need to do is, basically,…create the fields that you want in your mock data.…So, for example, in this one, we have…an id, so, you always need an id.…
First Name, Last Name, Email, Gender, and a IP Address.…I don't need the IP Address, I'm going to remove that.…So, if you want any other mock data inside of your…JSON data, you can actually add other fields.…I'm going to keep it as is.…And, 1000 rows is a little bit too much,…'cause we're going to load these in our server,…so I'm going to do, like, 50, that's pretty much what I want.…And then, switch this to JSON.…And then, Download Data.…
So, we have a mock data JASON file…that has been downloaded for us, so let's close that.…
- Creating a basic data endpoint
- Routing with Express
- Adding a static route for file serving
- Basic middleware with Express
- Built-in middleware and error-handling middleware
- Debugging in an Express application
- Security best practices with Express
Skill Level Beginner
Building RESTful Web APIs with Node.js and Expresswith Emmanuel Henri1h 40m Intermediate
1. Setting Up Express
2. Getting Started
3. Routing with Express
4. Middleware with Express
5. Advanced Topics in Express
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.