You can create a loopback 4 application within your nx workspace. This package has been made using nx-plugin executors and generators. It's more in a beta version, but improvements are more than welcome.
✨ This workspace has been generated by Nx, a Smart, fast and extensible build system. ✨
With Yarn:
yarn add nx-loopback
With NPM:
npm i nx-loopback --save
nx g nx-loopback:app
This creates the loopback application, in the apps folder.
Argument | Type | Required | Description |
---|---|---|---|
name | string | yes | The name of the application |
applicationClassName | string | no | The application class name, being used in the controllers |
description | string | yes | The description about the application |
applicationFeatures | array of strings | no | Enable features in the applications, like docker,api,etc |
directory | string | no | A directory where the project is placed |
nx run serve <app_name>
This starts the application.
Argument | Type | Required | Description |
---|---|---|---|
nodeEnvironment | string | no | The node environment LOCAL,STAGE,etc |
nx run build <app_name>
This builds the application using lb-stc command and creates a dist folder in the app.
Argument | Type | Required | Description |
---|---|---|---|
nodeEnvironment | string | no | The node environment LOCAL,STAGE,etc |
clean | boolean | yes | Clean the dist files, before build |
nx run watch <app_name>
This starts the application, with watching file changes and reload. We use tsc-watch under the hood for this.
Argument | Type | Required | Description |
---|---|---|---|
nodeEnvironment | string | no | The node environment LOCAL,STAGE,etc |
nx run clean <app_name>
This cleans the build files
- Genreate controllers, repositories, models and datasources.
- Migrate commands.
- Docker deploy
Run npx nx connect-to-nx-cloud
to enable remote caching and make CI faster.
Visit the Nx Documentation to learn more.