Skip to content

Commit cd9bf1b

Browse files
committed
android: add isRunning method
1 parent 734864a commit cd9bf1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/src/main/java/com/futurepress/staticserver/FPStaticServerModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ public void origin(Promise promise) {
177177
}
178178
}
179179

180+
@ReactMethod
181+
public void isRunning(Promise promise) {
182+
promise.resolve(server && server.isAlive());
183+
}
184+
180185
/* Shut down the server if app is destroyed or paused */
181186
@Override
182187
public void onHostResume() {

0 commit comments

Comments
 (0)