@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
84 lines (68 loc) • 2.14 kB
HTML
<head>
{% include analytics.html %}
</head>
<table width="750">
<thead>
<tr>
<th width="200">LB3 Commands</th>
<th width="200">LB4 Commands</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>lb</code> or <code>lb app</code>
</td>
<td>
<code>lb4</code> or <code>lb4 app</code>
</td>
<td> Create a new <a href="https://loopback.io/doc/en/lb4/Application.html">application</a>
</td>
</tr>
<tr>
<td>
<code>lb datasource</code>
</td>
<td>
<code>lb4 datasource</code>
</td>
<td> Create a new <a href="https://loopback.io/doc/en/lb4/DataSources.html">datasource</a>
</td>
</tr>
<tr>
<td>
<code>lb model</code>
</td>
<td>
<code>lb4 model</code>
</td>
<td> Create a new <a href="https://loopback.io/doc/en/lb4/Model.html">model</a>. In LB3, this would create the model, but you would automatically get all the model methods and remote methods. In LB4, this command only creates the model; you must also create a repository to handle the CRUD operations of your model, and you must create a controller to define your model's REST API endpoints. Alternatively, you can use <code>lb4 rest-crud</code> to create a configuration file that allows you to avoid having to create a repository and controller.
</td>
</tr>
<tr>
<td>
<code>lb relation</code>
</td>
<td>
<code>lb4 relation</code>
</td>
<td> Create a <a href="https://loopback.io/doc/en/lb4/Relations.html">relation</a> between two models
</td>
</tr>
<tr>
<td>
<code>lb swagger</code>
</td>
<td>
<code>lb4 openapi</code>
</td>
<td>
In LB3, create a fully functioning application using an API defined in the Swagger 2.0 specification.
In LB4, create a fully functioning application using an API defined in either the Swagger 2.0 or the OpenAPI 3.0 specification.
</td>
<td>
</td>
</tr>
</tbody>
</table>