2018-09-16 23:24:20 +02:00
|
|
|
|
2018-09-18 23:41:37 +02:00
|
|
|
import api.ApiClient;
|
2018-09-16 23:24:20 +02:00
|
|
|
import api.ApiService;
|
|
|
|
import repository.DataException;
|
|
|
|
import repository.RepositoryFactory;
|
|
|
|
import repository.RepositoryManager;
|
|
|
|
import repository.hsqldb.HSQLDBRepositoryFactory;
|
|
|
|
|
|
|
|
public class Start {
|
|
|
|
|
2018-10-15 15:11:22 +02:00
|
|
|
private static final String connectionUrl = "jdbc:hsqldb:file:db/test;create=true";
|
2018-09-24 00:21:47 +02:00
|
|
|
|
|
|
|
public static void main(String args[]) throws DataException {
|
|
|
|
RepositoryFactory repositoryFactory = new HSQLDBRepositoryFactory(connectionUrl);
|
|
|
|
RepositoryManager.setRepositoryFactory(repositoryFactory);
|
|
|
|
|
|
|
|
ApiService apiService = ApiService.getInstance();
|
|
|
|
apiService.start();
|
|
|
|
|
|
|
|
//// testing the API client
|
2018-10-04 22:58:04 +02:00
|
|
|
//ApiClient client = ApiClient.getInstance();
|
2018-10-15 15:11:22 +02:00
|
|
|
//String test = client.executeCommand("GET blocks/first");
|
2018-10-04 22:58:04 +02:00
|
|
|
//System.out.println(test);
|
2018-09-24 00:21:47 +02:00
|
|
|
}
|
2018-09-16 23:24:20 +02:00
|
|
|
}
|