diff --git a/README.fr.md b/README.fr.md index 4a1473324df50efd8902599ea8df568916da3cb5..914cc68a7f461685047bcec01de5ede739e3c6ee 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 43b9c913d62ab2f00720d16cc7a606dbd7f39d3d..3cc405e559492fbfb3d6e9eef25c71f39b38b777 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