From the course: Introducing Postman

Run the sample API - Postman Tutorial

From the course: Introducing Postman

Start my 1-month free trial

Run the sample API

- [Instructor] Before we begin using Postman we need to have something to issue requests against. To get the most out of this course you should be sure to obtain and run the sample API from the API folder with the exercise files. The sample API is a rudimentary ticket tracking system. It is implemented as a self contained node JS application, and simulates many common API scenarios including multiple routes, methods, query strings, and authentication. At a high level it is divided into four areas. Tickets which represent to do items, boards which provide a mechanism for grouping tickets, users to manage boards and tickets, and authentication to establish user context. All examples and exercises throughout this course will use this API, so I highly recommend making sure it's running before proceeding. The guided portions of the course will be centered on the boards and authentication areas, whereas challenges will center on adapting the concepts learned with boards to tickets. To start making requests against the sample API we need to run it. I've opened a terminal window and navigated to where I've saved the course materials. I'll first run NPM I, or NPM install, to make sure all of the dependencies are installed. I've already run the project on this machine so it went pretty quickly for me, but will likely take longer for you. Feel free to pause the video until the dependencies are installed if you're following along. With the packages now installed we can start the API. The package JSON file includes two platform specific startup scripts. I'm on a Mac so I'll use NPM run start Mac. Windows users will need to run NPM run start win instead. When the sample API is ready you'll see the message listening on port 3000 printed in the console. Now that we're certain the sample API is running, we can start making requests. Just remember, if you stop the API for any reason, you'll need to run the appropriate start command again.

Contents