Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 916 Bytes

README.md

File metadata and controls

37 lines (29 loc) · 916 Bytes

java-api

Database

  1. Create an empty database
  2. Run the following command from the base of your cloned directory to create the required database structure:
mysql --host=<localhost> --user=<your_username> --password=<your_password> <your_database_name> < employeesdb.sql

Config

  1. The following environment variables need to be set to enable database connection:
DB_USERNAME
DB_PASSWORD
DB_HOST
DB_NAME

How to start the java-api application

  1. Run mvn clean install -DskipTests=true to build your application
  2. Start application with java -jar target/JavaWebService-1.0-SNAPSHOT.jar server config.yml
  3. To check that your application is running enter url http://localhost:8080

Swagger

To see your applications Swagger UI http://localhost:8080/swagger

Tests

  1. Run mvn clean test to run unit tests
  2. Run mvn clean integration-test to run integration tests