-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
ExplorerMain.java
36 lines (29 loc) · 1.13 KB
/
ExplorerMain.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package nu.marginalia.explorer;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import nu.marginalia.service.MainClass;
import nu.marginalia.service.SearchServiceDescriptors;
import nu.marginalia.service.id.ServiceId;
import nu.marginalia.service.module.ServiceConfigurationModule;
import nu.marginalia.service.module.DatabaseModule;
import nu.marginalia.service.server.Initialization;
import spark.Spark;
public class ExplorerMain extends MainClass {
final ExplorerService service;
@Inject
public ExplorerMain(ExplorerService service) {
this.service = service;
}
public static void main(String... args) {
init(ServiceId.Explorer, args);
Spark.staticFileLocation("/static/explore/");
Injector injector = Guice.createInjector(
new ServiceConfigurationModule(SearchServiceDescriptors.descriptors, ServiceId.Explorer),
new ExplorerModule(),
new DatabaseModule(false)
);
injector.getInstance(ExplorerMain.class);
injector.getInstance(Initialization.class).setReady();
}
}