1.10.1 • Published 2 years ago

@lxdhub/web v1.10.1

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
2 years ago

NodeJS

Greenkeeper badge

Installation

To install the depencies of lxdhub-web, run the following command

yarn

Run for Development

Run the following command for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

yarn start

Build for Production

Run the following command, to build the project. The build artifacts will be stored in the dist/ directory.

API_URL=<PROD_API_URL> LOGGING_URL=<PROD_API_URL>api/v1/log npm run build

Docker

Run in Development

Run and open the site on http://localhost:4200

docker build -t lxdhub-web:dev . && docker run -p 4200:80 lxdhub-web:dev

Run in Production

  1. Configure nginx (optional)

You can configure the nginx configuration, which is used to serve the built dist/ folder. Readme more about nginx.

Edit the configuration by running in your shell vi nginx-custom.conf

  1. Build the image
docker build -t lxdhub-web:prod --build-arg env=prod \
--build-arg API_URL=http://prod.com:3000 \
--build-arg LOGGING_URL=http://prod.com:3000api/v1/log .
  1. Run the image
docker run -p 80:80  lxdhub-web:prod
  1. Open LXDHub Web in your browser http://localhost

Tests

Run the following command to execute the unit tests via Karma.

npm run test
npm run test:coverage # For coverage report, generated in folder coverage

More Links

People