Skip to main content
Get your local development environment set up and running in just a few minutes. This guide will walk you through cloning the repository, installing dependencies, and launching the application.

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js 20.x or higher
  • npm (comes with Node.js)
  • Git
This project uses Angular 20, which requires Node.js version 20.0.0 or higher.

Quick Start Steps

1

Clone the repository

Clone the Biblioteca Virtual Frontend repository to your local machine:
Expected output:
2

Install dependencies

Install all required npm packages:
This will install Angular 20 and all dependencies defined in package.json:
  • @angular/core: ^20.0.0
  • @angular/router: ^20.0.0
  • @angular/common: ^20.0.0
  • @angular/forms: ^20.0.0
  • rxjs: ~7.8.0
Expected output:
3

Configure the API endpoint

The application connects to a backend API. By default, it points to http://localhost:8080.If your backend is running on a different URL, update src/environments/environment.ts:
src/environments/environment.ts
Make sure your backend API is running before starting the frontend, or you’ll see connection errors in the browser console.
4

Start the development server

Launch the Angular development server:
This runs ng serve under the hood. Expected output:
5

Access the application

Open your browser and navigate to:
You should see the login page of the Biblioteca Virtual application.
The development server supports hot reload. Any changes you make to the source code will automatically refresh the browser.

Verify Your Setup

To verify everything is working correctly:
  1. Check the login page loads - Navigate to http://localhost:4200/auth/login
  2. Open browser DevTools - Press F12 and check the Console tab for any errors
  3. Verify API connectivity - The app should attempt to connect to your backend at http://localhost:8080

What’s Next?

Installation Guide

Learn about all available installation methods including Docker

Architecture Overview

Understand the project structure and architecture

Common Issues

If you see an error that port 4200 is already in use, you can specify a different port:
Or kill the process using port 4200:
If npm install fails, try:
  1. Clear npm cache: npm cache clean --force
  2. Delete node_modules and package-lock.json
  3. Run npm install again
If you see CORS errors or connection refused errors:
  1. Verify your backend is running on http://localhost:8080
  2. Check that CORS is properly configured in your backend
  3. Update the apiUrl in src/environments/environment.ts if needed

Available Scripts

Once installed, you have access to these npm scripts:
For more details on the build process and deployment options, check out the Installation Guide.