packages/amplication-plugin-api/README.md
Amplication Plugin is the component that process the amplication plugin catalog and serve the amplication client with the required information about them.
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.
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
# 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
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.
testExecutes tests.
npx nx test amplication-plugin-api
By default, your app comes with one user with the username "admin" and password "admin".
lintPerforms a linting check using ESLint.
# 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".