Creating models with command line

At this time, we have the necessary structure to start the development of our API.

We will now use the command line to create the models of our application. We will build two models: one model for the product/motorcycle and another for the user/consumer.

  1. Open terminal/shell inside the chapter-06 folder and type the following command:
    slc loopback:model
    
  2. Fill in the following information for motorcycle model, as shown in the following screenshot:

    Creating models with command line

    Screenshot of the terminal output after model motorcycle created

  3. Fill in the property name:
     Property name: image ? Property type: string ? Required? Yes ? Default value[leave ...

Get Node.js 6.x Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.