This repository contains code for a Car-Rentals application built with Angular on the frontend and Spring Boot on the backend and MySql.
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed on your machine. You can download and install them from Node.js website.
- Angular CLI installed globally. You can install it via npm by running:
- Java Development Kit (JDK) installed on your machine. You can download and install it from Oracle's website.
- Apache Maven installed on your machine. You can download and install it from Maven's website.
- Clone this repository to your local machine.
- Navigate to the
backend
directory: - Build the project using Maven:
- Run the Java application:
This will start the backend server on
http://localhost:8080
.
- Navigate to the
frontend
directory: - Install dependencies by running $npm install
- Start the Angular development server by running $npm run start
This will compile the Angular application and start a development server on
http://localhost:4200
.
- Run the Mysql server and create a local instance and connect it.
- Create a database name rentacar_db.
- Make sure to change your mysql username and password in application.properties file
Once both the backend and frontend servers are running, you can access the application by opening a web browser and navigating to http://localhost:4200
.
- The backend Spring Boot application is configured to run on port
8080
by default. If you need to change this port, you can modify theapplication.properties
file located in thebackend/src/main/resources
directory. - Similarly, the frontend Angular application is configured to proxy requests to
http://localhost:8080
, assuming the backend is running on the default port. If your backend is running on a different port, you may need to update theproxy.conf.json
file in thefrontend
directory accordingly.