Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.31 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.31 KB

Ditto Java Server Quickstart App 🚀

Prerequisites

For more information, see - Java Install Guide

Getting Started

  1. Create an application at https://portal.ditto.live/. Make note of the Database ID and development token.
  2. Copy the .env.sample file at the top level of the quickstart repo to .env and add your Database ID and development token.
  3. Synchronize your project with the Gradle file by clicking Build > Sync Project with Gradle Files.
  4. Open a terminal and run the following command to launch the app:
    • ./gradlew bootRun
  5. Open http://localhost:8080 in a browser to interact with the app.

Maven build

The Maven variant reuses this directory's application sources. From quickstart/java-server, load the values from the quickstart root .env and build with:

set -a
. ../.env
set +a
./java-spring-maven/mvnw -f java-spring-maven/pom.xml package -DskipTests

The Maven build embeds the three Ditto values in its generated configuration class. If the environment variables are unset, empty values allow compilation.

Additional Resources