enabling api with gui

This commit is contained in:
Mike Rosseel 2016-09-04 20:38:32 +02:00
parent da5a733d67
commit ef5b71aad0
3 changed files with 12 additions and 3 deletions

View File

@ -147,6 +147,11 @@
<artifactId>jcsv</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>io.bitsquare</groupId>
<artifactId>api</artifactId>
<version>0.4.9.2</version>
</dependency>
</dependencies>
</project>

View File

@ -22,6 +22,7 @@ import ch.qos.logback.classic.Logger;
import com.google.inject.Guice;
import com.google.inject.Injector;
import io.bitsquare.alert.AlertManager;
import io.bitsquare.api.service.DropwizardApplication;
import io.bitsquare.arbitration.ArbitratorManager;
import io.bitsquare.btc.WalletService;
import io.bitsquare.common.CommonOptionKeys;
@ -144,6 +145,7 @@ public class BitsquareApp extends Application {
bitsquareAppModule = new BitsquareAppModule(env, primaryStage);
injector = Guice.createInjector(bitsquareAppModule);
injector.getInstance(InjectorViewFactory.class).setInjector(injector);
injector.getInstance(DropwizardApplication.class).run("server", "bitsquare-api.yml");
Version.setBtcNetworkId(injector.getInstance(BitsquareEnvironment.class).getBitcoinNetwork().ordinal());

View File

@ -19,6 +19,7 @@ package io.bitsquare.app;
import com.google.inject.Singleton;
import io.bitsquare.alert.AlertModule;
import io.bitsquare.api.app.ApiModule;
import io.bitsquare.arbitration.ArbitratorModule;
import io.bitsquare.btc.BitcoinModule;
import io.bitsquare.common.Clock;
@ -82,6 +83,7 @@ class BitsquareAppModule extends AppModule {
install(guiModule());
install(alertModule());
install(filterModule());
install(apiModule());
}
private TradeModule tradeModule() {
@ -104,9 +106,7 @@ class BitsquareAppModule extends AppModule {
return new FilterModule(env);
}
private OfferModule offerModule() {
return new OfferModule(env);
}
private OfferModule offerModule() { return new OfferModule(env); }
private P2PModule torModule() {
return new P2PModule(env);
@ -119,4 +119,6 @@ class BitsquareAppModule extends AppModule {
private GuiModule guiModule() {
return new GuiModule(env, primaryStage);
}
private ApiModule apiModule() { return new ApiModule(env);
}
}