diff --git a/README.md b/README.md index 1619dcacd9098c77e285790a0ec004164af80cb4..ecc792e0d1aa03dae645845be3bc2be1b5343286 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,16 @@ JavaDoc: The following javadoc can be found inside the target file the same way as it is for the jacico test-coverage. path: /target/site/apidocs/index.html +## Database +The current database we are using is H2 database. Our database configuration is H2 inmemory database, more details can be found inside application properties. +In the initiation of backend, test data are created instantly. The initiation happens in LoadDatabaseConfig file. + +There are currently two users that are already defined in the database in the initialization. + +`user 1: "username": "test", "password": "password"`<br/> + +`user 2: "username": "test2, "password": "password"` ## Future work ### Implementing administration The problem with the current program is that there is no administrative methods that are used. Currently, the only admin methohd is an api-call for getting all users and trivios, but for now, they are not used in prod, but rather for testing. @@ -143,6 +152,9 @@ As for now, we only have the timestamps and date for submitting the score. In th Our current method for storing the key is inside the application.properties file. For now, it is really not good practice, cause the key is out in public. In the future we could implement other methods to store the secret key. Either in differnt application.propeterties file or databases or env.files. +### Different approach than an inmemory database +As we mentioned previously, we used h2 inmemory database, which meant by design that it is volatile and results in dataloss after application start. This can be changed in behavior by using a file-based storage in h2. + ## Authors Gia Hy Nguyen Tini Tran