RESTful API with Express

Where's the data? Express to the rescue!5 H 7 M

Just you? Training a whole team? There's an ITProTV plan that fits.

Start Training Today
  • RESTful API with Express
    • Overview
    • What is RESTful API
    • Building a Simple Express Application
    • Our First Middleware
    • Our First Middleware Part 2
    • Building Our Routes
    • Building Our Routes Part 2
    • Data Modeling
    • Data and Routes
    • Data Persistence
    • Data Persistence Part 2
    • Adding Locations
    • Adding Locations Part 2
    • Refactor Models


3 M

itprotv course thumbnailitprotv course thumbnailitprotv course thumbnail
  • Episode Description
  • Transcript

In this series, we creates a RESTful API using the Express web application framework. Justin review the process of setting up a Node-based project as well as installing the Express Node module. After that, Justin discusses important concepts and processes that are key in developing a RESTful API such as creating routes that correspond to data resources, data modeling of those resources, use of middleware to make the API a little more robust, and adding a persistence layer to the API. RESTful APIs are abound when developing software, so if that sounds like something interesting to you, then join us!

[MUSIC] In this series, we're going to be looking at RESTful API with Express. And joining us for this series is gonna be none other than Mr. Justin Dennison. Justin, what can we expect in our journey throughout this series? >> Well, in this series, we're gonna be focusing on building a RESTful API, about how to design, what is REST, right? What does REST mean when we're designing a RESTful API? So it's subject verb essentially and you're like, whoa, I'm not here for an English lesson. Well, it'll be all right. We're gonna build a corollary between those two. And then, well, our implementation details just so happened to be Express. But the first part of this series is kind of applicable to other frameworks or other web-based frameworks for building APIs, right? But then we're really gonna dig down into Express, and start building middleware that helps us handle bad requests, help us log out those requests, but also make sure we have all this division of labor between, well, what is routing our data to and from. And we're building a JSON based RESTful API, just in case you're wondering. And also where is the data held? How are we persisting that data between requests? And, well, we're really gonna get down deep. >> Justin, we always try to define some expectations. So if we are gonna set the expectations for this series, who is this gonna be for? >> So in all actuality, you need some fairly significant JavaScript experience. It would be nice if you already have experience with Node JS as a platform, not necessarily Express but the tooling like NPM, that you can run Node, that Node's installed. And well, you've been programming for a little bit in JavaScript, so some of the constructs that I use are not completely foreign. Other than that, you should be fine. If you're brand new though, right? And you've never programmed before, you've never seen JavaScript before, this course may be, you're just like, I have no idea what he is talking about, crazy shenanigans, other than the first couple of episodes that are going to be kind of applicable throughout. So you need to have some prior programming experience and it would be helpful if you know a little bit about web programming and like HTTP as well. >> Justin, a great many of the courses that are in our library out there are certification centric, right? Somebody's gonna sit the hot seat, gonna take that exam, maybe for the purposes of moving into a new job, a new role with maybe their current job. Is this one that's gonna be maybe certification-centric? >> This one is not certification-centric. Now, as it stands, maybe down the road, it may become something like that as the industry changes. But at current time, there is no certification about being able to build a RESTful API, well, particularly with Express. That would be an oddly specific certification. This course is more about, all right, I have some programing experience. I've been doing some web based programming before and I now wanna step up my game. I wanna get better, right? I need to know how to serve up JSON so I can build client-side applications that consume them. Well, I built my API, I built an Android app, an iOS app and a web app that all consume that and now I'm starting to build something a little bit larger. That's the ultimate goal is to help you start building that backend. Now, it's not necessarily gonna be the most robust one. This series is about learning. And if that definitely sounds like something you would enjoy or that you're at least very interested in, then we hope to see you there. [MUSIC]