This project is a simple web application built with Spring Boot and Angular. It demonstrates how to create a RESTful API using Spring Boot and consume it in an Angular frontend.
- Java JDK 8 or higher
- Maven
- Node.js and npm installed
- Clone the repository:
git clone https://github.com/abhishekshah2905/spring-angular.git- Navigate to the project directory:
cd sprular-server- Build the project:
mvn clean install- Run the application:
mvn spring-boot:run- Navigate to the angular.json file directory:
cd sprular-web/src/main/web/np-app- Install the Angular CLI if you haven't already:
npm install -g @angular/cli- Install the frontend dependencies:
npm install- Build the Angular application:
ng build --prod- Access the application at http://localhost:4200/
- The CorsConfig class enables CORS for the API endpoints, allowing the Angular frontend to make requests to the backend.
- The Angular frontend is configured to use environment-specific settings (environment.ts and environment.prod.ts) for API endpoints and other configurations.