Back to Loopback Next

Lb3 Only Commands

docs/site/migration/tables/lb3-only-commands.html

4.0.0-alpha.13.4 KB
Original Source

{% include analytics.html %}

CommandsDescriptionWorkaround in LB4
lb bluemixCreate a new application destined in BluemixWe have several tutorials on how to deploy a LoopBack 4 application to the IBM Cloud: Deploying to Cloud Foundry on IBM Cloud, Deploying to Kubernetes on IBM Cloud, Deploying to Kubernetes on IBM Cloud using Appsody
lb propertyAdds properties to an existing modelOpen the model file, and manually add a new property.
lb aclAdds acl settings to modelsThe access-control-migration example demonstrates how to implement a Role Based Access Control (RBAC) system in LoopBack 4 using the AuthenticationComponent and AuthorizationComponent components. Also, see Migrating authentication and authorization for more details.
lb remote-methodAdds a new remote method to an applicationOpen the model's controller file, add a new controller method, and decorate the new method with the appropriate rest decorator to define the new REST API endpoint. See Writing controller methods for more details. Depending on the purpose of this new controller method, you may also need to add a new method to the model's repository.
lb middlewareAdd new middleware to the applicationThere is work in progress to enable express middleware in the form of interceptors that you will need to create and register. Also, see Migrating Express middleware for more details.
lb boot-scriptCreates a skeleton boot script in server/boot directory. Allows for customized intialization of anything during boot phaseCreate a lifecycle observer to run custom code during different phases of the application's lifecycle; including startup. See Migrating boot scripts for more details.
lb export-api-defExport the application's API definitions to a YAML or JSON fileVisit the application's /openapi.json endpoint to access your OpenAPI specification in JSON format, or the /openapi.yaml endpoint for YAML. Alternatively, the OpenAPI specification file can also be accessed in code through the getApiSpec() function from your RestServer instance. Read Reviewing your API Specification for more details.
lb soapCreate a SOAP client based on a SOAP service's WSDL fileSee Calling other APIs and web services for the simple steps required to connect to a SOAP service.