Skip to content
Aaron Hanusa edited this page Aug 19, 2016 · 23 revisions

Application Walkthrough

The sample application is a ficticious order entry / inventory management system web api.

This walkthrough will cover creating a customer, category, product, and placing an order on behalf of the new customer via the api. Further, you will ship an order and see how it affects inventory as well. Along the way, you will see the peasy-js validation rules engine in action and how you can use concurrency techniques within your middle tier.

In order to successfully follow along with this tutorial, please be sure to read [running the application] (https://github.com/peasy/peasy-js-samples#running-the-application).

This tutorial uses Postman to interact with the web api, however, you can choose to use whatever http communication tool that you are comfortable with.

To begin, let's query our current users:

You should notice that one customer is returned and that a status code of 200 is returned.

Let's create a new customer who we will eventually place an order on behalf of:

Notice that a POST request was made with the content type set as application/json. Further, notice that the request resulted with a status code of 201. Make note of the customer id that was assigned.

Now let's query for existing categories:

You should notice that one category is returned and that a status code of 200 is returned.

Let's create a new category:

Clone this wiki locally