diff options
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index d070c9fd7..9ec73d819 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -61,6 +61,7 @@ import org.traccar.sms.SmsManager; import org.traccar.speedlimit.OverpassSpeedLimitProvider; import org.traccar.speedlimit.SpeedLimitProvider; import org.traccar.storage.Storage; +import org.traccar.web.WebServer; import javax.annotation.Nullable; import javax.inject.Singleton; @@ -128,6 +129,14 @@ public class MainModule extends AbstractModule { return null; } + @Provides + public static WebServer provideWebServer(Config config) { + if (config.hasKey(Keys.WEB_PORT)) { + return new WebServer(config); + } + return null; + } + @Singleton @Provides public static Geocoder provideGeocoder(Config config) { |