Skip to content
Snippets Groups Projects
Commit 43afdda6 authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Merge branch 'develop' into 'master'

README changes.

See merge request !5
parents 62cd1886 1c442c1a
Branches
1 merge request!5README changes.
......@@ -30,4 +30,56 @@ 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/).
Pour l'arrêter, vous devriez pouvoir utiliser le raccourci clavier CTRL+C. Sinon, lancez un autre
terminal dans le dossier du projet et exécutez :
```
./gradlew stop
```
ou, sur Microsoft Windows,
```
.`gradlew stop
```
### 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
......@@ -30,4 +30,52 @@ 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/).
To stop it, you should be able to use the CTRL+C keyboard shortcut. Otherwise, run another terminal
in the project folder and use:
```
./gradlew stop
```
or, on Microsoft Windows,
```
.`gradlew stop
```
### 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
File mode changed from 100755 to 100644
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment