dashboard/README.md
2022-12-21 15:45:11 +03:00

1.7 KiB

Dashboard

Libraries

Guides

Installation

  1. Add environment and configurations:

    • src/appConfig.json:

      {
          "apiEndpoint": "https://api.xample.com",
          "urlShortenerEndpoint": "https://shrt.example.com",
          "checkoutEndpoint": "https://checkout.example.com",
          "docsEndpoints": {
              "payments": "https://example.com/docs"
          },
          "theme": {
              "name": "main"
          },
          "sentryDsn": "https://public@sentry.example.com/1",
          "keycloakEndpoint": "https://auth.example.com"
      }
      
    • src/authConfig.json:

      {
          "realm": "external",
          "auth-server-url": "https://auth.example.com/auth/",
          "ssl-required": "external",
          "resource": "koffing",
          "public-client": true
      }
      
  2. Install packages

    npm ci
    

Development server

  1. npm start

  2. Navigate to http://localhost:8000/

Production build

  1. Run npm run build
  2. The build artifacts will be stored in the dist/ directory.

Tests

  • Run npm run test to execute the unit tests via Karma.

Utils

Analyze bundle size

npm run build -- --prod --stats-json --extraWebpackConfig webpack.extra.js
npx webpack-bundle-analyzer dist/stats.json