Skip to content

o-s-expert/harperdb-samples

Repository files navigation

HarperDB and Java Sample Projects

Overview

This repository contains multiple Java projects that demonstrate how to integrate HarperDB with different Java frameworks, including Quarkus, Micronaut, and Spring. You can choose to use the cloud-based HarperDB solution at HarperDB Cloud or run it locally using Docker.

To run HarperDB locally with Docker, execute the following command:

docker run -d \
  -e HDB_ADMIN_USERNAME=root \
  -e HDB_ADMIN_PASSWORD=password \
  -e HTTP_THREADS=4 \
  -p 9925:9925 \
  -p 9926:9926 \
  harperdb/harperdb

Getting Started

Follow these steps to set up and run the projects:

  • Install Maven: If you don’t have Maven installed, you can download it from Maven Apache and follow the installation instructions.

  • Clone the Repository:

git clone <repository_url>
cd harperdb-samples
  • Choose a Project:

    • Navigate to the subdirectories (e.g., quarkus-project, micronaut-project, spring-project) for the Java framework you want to explore.

  • Configure HarperDB:

    • If you are using HarperDB Cloud, sign up for an account at HarperDB Cloud and obtain your API credentials.

    • If you are running HarperDB locally with Docker, ensure Docker is running with the provided configuration.

  • Update Configuration:

    • Open the relevant configuration files in the selected Java project (e.g., application.properties, harperdb.properties) and configure your HarperDB connection details.

  • Build and Run:

mvn clean install
  • Access the Applications: Open your web browser and navigate to the respective application endpoints to interact with each Java project.

Resources

Feel free to explore the provided sample code, customize it for your use cases, and leverage HarperDB’s capabilities to build modern and efficient Java applications with different frameworks.

For detailed usage and integration instructions, refer to the documentation links provided above.

Projects

Folder Description Article Link

01 Hello World

A simple Java application that demonstrates how to connect to HarperDB and perform basic CRUD operations.

Article

02 Hello World Quarkus

A simple Quarkus application that demonstrates how to connect to HarperDB and perform basic CRUD operations.

Article

License

This project is licensed under the Apache License 2.0.

About

The integration of HarpderDB and Java samples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published