An Angular application demonstrating a quiz platform with a modern UI, reusable components, and REST API integration.
- Angular 22
- Standalone Components
- REST API integration
- Environment-based configuration
- Responsive user interface
- Unit tests with Vitest
- Node.js 20+
- npm
- Angular CLI
Clone the repository:
git clone https://github.com/romkaras2-a11y/app-quiz.git
cd app-quizInstall dependencies:
npm installThe project uses Angular environments.
src/environments/environment.dev.ts
Example:
export const environment = {
production: false,
apiUrl: 'http://localhost:8080/api'
};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.apiUrlinstead of hardcoded URLs.
Start the development server:
ng serveOpen:
http://localhost:4200
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.jsonDevelopment build:
ng buildProduction build:
ng build --configuration productionRun unit tests:
ng testsrc/
├── app/
├── environments/
│ ├── environment.dev.ts
│ └── environment.prod.ts
├── assets/
└── styles/
MIT License - Freie Nutzung für private und kommerzielle Zwecke.
Roman Karas