Skip to content
Subhrodip Mohanta edited this page Apr 3, 2026 · 1 revision

Installation

Follow these steps to set up the Moo: Twitter Clone Backend on your local machine.

Prerequisites

  • JDK 21+: We recommend the Microsoft Build of OpenJDK 21.
  • Maven 3.9+: For building the project.
  • Docker & Docker Compose: (Optional) For running the application in a containerized environment.
  • MySQL: (Optional) If you want to run a local database instead of the embedded H2.

Quick Start

1. Clone the Repository

git clone https://github.com/scaleracademy/twitter-backend-java
cd twitter-backend-java

2. Environment Setup

Copy the example environment file and update it with your local credentials:

cp .env.example .env

3. Build the Project

Use the Maven wrapper to ensure you are using the correct Maven version:

./mvnw clean install

4. Run the Application

You can run the application using the dev profile which connects to your local configuration:

./mvnw spring-boot:run -Dspring-boot.run.profiles=dev

The API will be available at http://localhost:8080.

Docker Installation

If you prefer Docker, you can start the entire stack (App + MySQL) with a single command:

docker-compose up -d

Clone this wiki locally