/car-rental

Primary LanguageTypeScript

CarRental

This app was created with Bootify.io - tips on working with the code can be found here.

Development

When starting the application docker compose up is called and the app will connect to the contained services. Docker must be available on the current system.

During development it is recommended to use the profile local. In IntelliJ -Dspring.profiles.active=local can be added in the VM options of the Run Configuration after enabling this property in "Modify options". Create your own application-local.yml file to override settings for development.

In addition to the Spring Boot application, the development server must also be started - for this Node.js version 20 is required. Angular CLI and required dependencies must be installed once:

npm install -g @angular/cli
npm install

The development server can be started as follows:

ng serve

Your application is now accessible under localhost:4200.

Add code using Angular schematics with ng generate .... Frontend unit tests can be executed with ng test. Generate a messages.json for translation with ng extract-i18n –format=json.

Build

The application can be built using the following command:

gradlew clean build

Start your application with the following command - here with the profile production:

java -Dspring.profiles.active=production -jar ./build/libs/car-rental-0.0.1-SNAPSHOT.jar

If required, a Docker image can be created with the Spring Boot plugin. Add SPRING_PROFILES_ACTIVE=production as environment variable when running the container.

gradlew bootBuildImage --imageName=at.rspiegl/car-rental

Further readings