Back to Amplication

Amplication Plugin Api

packages/amplication-plugin-api/README.md

3.15.02.2 KB
Original Source

Amplication Plugin Api

Amplication Plugin is the component that process the amplication plugin catalog and serve the amplication client with the required information about them.

Setup

Amplication is using a mono-repo with multiple packages. To initialize all the packages on a local development environment, follow the Getting Started With Local Development section to do that in a few quick steps.

How to run locally

In order run the plugin api locally and populate the plugin cache (stored in a SQL db), the following two commands need to be run

sh
# To initialise the plugin api db
npx nx db:init amplication-plugin-api

# To serve the service
npx nx serve amplication-plugin-api

# To populate the plugin api db from the plugin catalog
npx nx refresh:plugins amplication-plugin-api

Useful Targets

Targets can be run using Nx Workspaces. You can read more about targets in the Nx Documentation.

You can find a full list of targets in the project.json file.

test

Executes tests.

npx nx test amplication-plugin-api

By default, your app comes with one user with the username "admin" and password "admin".

Step 2.2: Scripts - container based development

lint

Performs a linting check using ESLint.

shell
# start the server component as a docker container
$ npm run compose:up

npx nx lint amplication-plugin-api


### `build`

Builds the app for production. The distributable is expored to the `dist` folder in the repository's root folder.


npx nx build amplication-plugin-api


### `serve`

Runs the app in development mode.

npx nx serve amplication-plugin-api


### `refresh:plugins`

Runs a curl GraphQL request targeting the running `amplication-plugin-api` service to trigger the collection and storage of new plugin from the plugin catalog and new plugin versions from npmjs. 

npx nx refresh:plugins amplication-plugin-api By default, your app comes with one user with the username "admin" and password "admin".