Skip to content

Front-end

Installation

Requirements

Clone the repository:

git clone https://gitlab.ics.muni.cz/cryton/cryton-frontend.git
cd cryton-frontend

Install the dependencies:

npm install

Serve the app:

ng serve --port 8080
ng serve --prod --port 8080

Use ng serve only for development/testing. In a real production environment use either Docker installation or a production build deployed on a production-ready web server (for example Nginx).

Build the app

You can find the build in the /dist folder.

npm run build
npm run build-prod

Usage

Start a development server:

npm start

The app will refresh itself when the project changes.

We use Husky to run pre-commit hooks

  • Code formatting with Prettier.
  • Linting with ESLint.
  • Running unit tests with Karma.

Build a Docker image

If you want to build a Docker image, switch to the correct directory:

cd cryton-frontend

Build the image:

docker build -t <image-name> .

Test it:

docker run -p 127.0.0.1:8080:80 --rm <image-name>