From b4b2c2ca1f8c4b7165dc6866ca64facfaf912d90 Mon Sep 17 00:00:00 2001
From: BEAUVAIS ANTOINE <antoine.beauvais@etu.unistra.fr>
Date: Fri, 24 Sep 2021 11:05:12 +0200
Subject: [PATCH] Updated README with Gradle command.

---
 README.fr.md | 43 ++++++++++++++++++++++++++++++++++++++++++-
 README.md    | 39 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/README.fr.md b/README.fr.md
index 4a14733..914cc68 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -30,4 +30,45 @@ Il est conseillé d'utiliser un IDE Java pour exécuter et déployer l'applicati
 * [Apache NetBeans](https://netbeans.apache.org/) (gratuit et *open-source*)
 * [Eclipse IDE for Java Developers](https://www.eclipse.org/downloads/packages/) (grauit et *open-source*)
 
-TODO: Insérer les commandes Gradle.
+#### Préparation
+
+Assurez-vous que votre machine possède un kit de développement Java (JDK) version
+**8 ou ultérieur**. Le JDK complet est requis pour compiler l'application. Le fichier WAR 
+peut être déployé sur une machine ne possédant que la JRE.
+
+Afin que l'application fonctionne, vous devez configurer une clé d'authentification 
+pour l'API de l'application.
+
+Dans `src/main/resources`, créez un nouveau fichier `apikey.properties` contenant :
+
+```
+api.key=MyApiKey
+```
+
+#### Compilation et exécution
+
+Vous pouvez compiler et lancer le projet en utilisant la commande suivante sur 
+un système UNIX ou UNIX-like :
+
+```
+./gradlew bootRun
+```
+
+Sur Microsoft Windows, utilisez :
+
+```
+.\gradlew bootRun
+```
+
+Quand l'application tourne, vous pouvez y accéder à travers l'adresse URL 
+[http://127.0.0.1:8080/](http://127.0.0.1:8080/).
+
+### Appel de l'API
+
+TODO: Ajouter la spécification OpenAPI.
+
+Utilisez [Postman](https://www.postman.com/) ou [Advanced REST Client](https://install.advancedrestclient.com/install) pour l'appeler l'API REST.
+
+Tous les appels vers l'API doivent posséder la clé d'authentification configurée
+dans le fichier `apikey.properties` de l'application. Elle doit être spécifiée 
+dans l'en-tête HTTP `apikey`.
\ No newline at end of file
diff --git a/README.md b/README.md
index 43b9c91..3cc405e 100644
--- a/README.md
+++ b/README.md
@@ -30,4 +30,41 @@ It is recommended to use a Java IDE to run and deploy the application.
 * [Apache NetBeans](https://netbeans.apache.org/) (free and open-source)
 * [Eclipse IDE for Java Developers](https://www.eclipse.org/downloads/packages/) (free and open-source)
 
-TODO: Insert manual Gradle commands.
+#### Preparing
+
+Make sure you have at least a Java Development Kit version **8** installed on your machine.
+You must have the full JDK to build the program. You can deploy the WAR file on a machine 
+with the JRE only.
+
+First, make sure you create an API key for the application.
+
+In `src/main/resources`, create a new `apikey.properties` file that contains:
+
+```
+api.key=MyApiKey
+```
+
+#### Building and running
+
+You can build and run the project using the following command on UNIX-based systems:
+
+```
+./gradlew bootRun
+```
+
+On Microsoft Windows, use:
+
+```
+.\gradlew bootRun
+```
+
+When running, you can reach the application at [http://127.0.0.1:8080/](http://127.0.0.1:8080/).
+
+### Calling the API
+
+TODO: Add OpenAPI specification.
+
+Use [Postman](https://www.postman.com/) or [Advanced REST Client](https://install.advancedrestclient.com/install) to make calls to the RESTful API.
+
+Note that all calls to the API must specify the API key configured in the 
+application's `apikey.properties` file in the `apikey` HTTP header.
\ No newline at end of file
-- 
GitLab