Informasjonsforvaltning / catalog-frontend

Apache License 2.0
1 stars 1 forks source link

CatalogFrontend

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Installation

Make sure you have Yarn installed.
Then run the command below to install the dependencies:
yarn install

Development server

Run yarn nx serve concept-catalog for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. Remember to add your organization number to the end of the url, e.g. http://localhost:4200/123456789.

Understand this workspace

Run yarn nx graph to see a diagram of the dependencies of the projects.

Remote caching

Run yarn nx connect-to-nx-cloud to enable remote caching and make CI faster.

Add nextjs app

Run yarn nx g @nrwl/next:app my-new-app to add new app to this monorepo.

Add library

Run yarn nx g @nrwl/next:lib my-new-lib to add new library to this monorepo.

Add new pages

Run yarn nx g @nrwl/next:page my-new-page --project=concept-catalog to add new page to concept-catalog app this monorepo.

Add new components

Run yarn nx g @nrwl/next:component my-new-component --project=ui to add a new component to ui library in libs folder

Testing

Unit tests

yarn nx test concept-catalog

E2E tests

Set up the environment variables in the .env file in the root of the project.

E2E_AUTH_ADMIN_ID=
E2E_AUTH_READ_ID=
E2E_AUTH_WRITE_ID=
E2E_CATALOG_ID=
E2E_KEYCLOAK_ID_SERVICE_CATALOG_FRONTEND=
E2E_KEYCLOAK_SECRET_SERVICE_CATALOG_FRONTEND=
E2E_NEXTAUTH_SECRET=

Run tests with the following command:

yarn nx e2e service-catalog-e2e --ui

Linting

yarn nx lint concept-catalog

Producing a production build

yarn nx run concept-catalog:build:production

Further help

Visit the Nx Documentation and Nx NextJs to learn more.