Skip to content

Repository files navigation

App Quiz

An Angular application demonstrating a quiz platform with a modern UI, reusable components, and REST API integration.

Features

  • Angular 22
  • Standalone Components
  • REST API integration
  • Environment-based configuration
  • Responsive user interface
  • Unit tests with Vitest

Requirements

  • Node.js 20+
  • npm
  • Angular CLI

Installation

Clone the repository:

git clone https://github.com/romkaras2-a11y/app-quiz.git
cd app-quiz

Install dependencies:

npm install

Development

The project uses Angular environments.

Development Environment

src/environments/environment.dev.ts

Example:

export const environment = {
  production: false,
  apiUrl: 'http://localhost:8080/api'
};

Production Environment

src/environments/environment.prod.ts

Example:

export const environment = {
  production: true,
  apiUrl: 'https://your-api.example.com/api'
};

The application should access the backend using:

environment.apiUrl

instead of hardcoded URLs.

Running the application

Start the development server:

ng serve

Open:

http://localhost:4200

Optional: Proxy Configuration

If you use a local backend, you can configure a proxy (proxy.conf.json) and use relative API paths during development.

Example:

{
  "/api": {
    "target": "http://localhost:8080",
    "secure": false,
    "changeOrigin": true
  }
}

Run Angular with:

ng serve --proxy-config proxy.conf.json

Build

Development build:

ng build

Production build:

ng build --configuration production

Testing

Run unit tests:

ng test

Project Structure

src/
 ├── app/
 ├── environments/
 │    ├── environment.dev.ts
 │    └── environment.prod.ts
 ├── assets/
 └── styles/

📝 Lizenz

MIT License - Freie Nutzung für private und kommerzielle Zwecke.

Author

Roman Karas

About

Angular application demo-quiz-platform with a modern UI and REST API integration.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages