A Spring Boot application for generating tweets using the Groq API.
This application requires a Groq API key to function properly. You can set it up in one of the following ways:
-
Environment Variable: Set the
GROQ_API_KEYenvironment variable in your system.# For Linux/Mac export GROQ_API_KEY=your_groq_api_key_here # For Windows (Command Prompt) set GROQ_API_KEY=your_groq_api_key_here # For Windows (PowerShell) $env:GROQ_API_KEY="your_groq_api_key_here"
-
Application Properties: Create a file named
application-local.propertiesin thesrc/main/resourcesdirectory with the following content:groq.api.key=your_groq_api_key_hereThen run the application with the
localprofile:./mvnw spring-boot:run -Dspring.profiles.active=local
-
Environment File (Recommended): Copy the
.env.templatefile to.envin the root directory of the project and fill in your API key:# Copy the template cp .env.template .env # Edit the .env file with your editor # Set GROQ_API_KEY=your_actual_api_key_hereThe application will automatically load variables from this file on startup.
./mvnw spring-boot:run./mvnw test