https://github.com/devpro/ecorp-frontend-demo
Demonstration of a simple frontend for E Corp (fake company)
https://github.com/devpro/ecorp-frontend-demo
Last synced: 11 months ago
JSON representation
Demonstration of a simple frontend for E Corp (fake company)
- Host: GitHub
- URL: https://github.com/devpro/ecorp-frontend-demo
- Owner: devpro
- License: gpl-3.0
- Created: 2022-07-26T15:37:30.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-29T14:00:36.000Z (about 3 years ago)
- Last Synced: 2025-01-11T04:31:44.031Z (about 1 year ago)
- Language: TypeScript
- Size: 266 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# E Corp Frontend demo application
[](https://gitlab.20.101.158.124.sslip.io/ecorp/ecorp-frontend-demo/-/pipelines)
[](https://sonarqube.20.101.158.124.sslip.io/dashboard?id=ecorp_ecorp-frontend-demo)
Demonstration of a simple frontend for E Corp (from [Mr Robot](https://en.wikipedia.org/wiki/Mr._Robot)). It is a web application (a Single Page Application to be precise), written in TypeScript, using Angular framework.
## How to run
### Container image
Container images are automatically built and available on [Harbor](https://harbor.20.101.158.124.sslip.io/harbor/projects/2/repositories/ecorp-frontend-demo/artifacts-tab).
Execute the following command line to run a container locally.
```bash
docker run -it --rm -p 9000:80 harbor.20.101.158.124.sslip.io/ecorp/ecorp-frontend-demo:1.0.17
```
Navigate to [localhost:9000](http://localhost:9001) to open the website.
### Helm chart
The best way to deploy and run this application is by executing the workload as containers orchestrated Kubernetes, thanks to the [Helm chart](https://devpro.github.io/helm-charts/).
Execute the following command lines to deploy the definitions to your Kubernetes cluster.
```bash
# adds devpro Helm repository
helm repo add devpro https://devpro.github.io/helm-charts
# installs E Corp applications
helm install ecorp-demo
```
## How to build
### Requirements
* NPM
* Angular CLI
```bash
npm install -g @angular/cli
```
* Docker (or Podman)
* Visual Studio Code or any other IDE
### Build & test
Execute the following command lines to build and test the solution.
```bash
# builds the project
ng build
# executes the unit tests via Karma (https://karma-runner.github.io)
dotnet test
# executes the end-to-end tests (not implemented for the moment, will use Cypress in a near future)
ng e2e
```
### Run the development server
Execute the following command line to run the web application.
```bash
ng serve
```
Navigate to [localhost:4200](http://localhost:4200/).
### Run in a local container
Execute the following command line to build and run the API in a container.
```bash
docker build . -t ecorp-frontend-demo
docker run -it --rm -p 9000:80 ecorp-frontend-demo
```
Navigate to [localhost:9000](http://localhost:9000/) to open the website.