aboutsummaryrefslogtreecommitdiffstats
path: root/Drop Serve/AppDelegate.m
diff options
context:
space:
mode:
authorTeddy Wing2020-10-10 20:36:58 +0200
committerTeddy Wing2020-10-10 20:36:58 +0200
commit06118327277b6488a62d48f1471366565be0109f (patch)
tree405cadb6196a1563622864fd7c236f45167717a8 /Drop Serve/AppDelegate.m
parentd25f3e58ec4591ec884b43c6ac215699925ea726 (diff)
downloadDrop-Serve-06118327277b6488a62d48f1471366565be0109f.tar.bz2
Start a Python SimpleHTTPServer in dropped file directory
When a file or directory is dropped on the drop zone, start a Python SimpleHTTPServer from that directory. Ensure the server is terminated when the Drop Serve application quits.
Diffstat (limited to 'Drop Serve/AppDelegate.m')
-rw-r--r--Drop Serve/AppDelegate.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/Drop Serve/AppDelegate.m b/Drop Serve/AppDelegate.m
index f92f421..4a72685 100644
--- a/Drop Serve/AppDelegate.m
+++ b/Drop Serve/AppDelegate.m
@@ -8,6 +8,8 @@
#import "AppDelegate.h"
+#import "Server.h"
+
@implementation AppDelegate
- (void)dealloc
@@ -19,4 +21,9 @@
{
}
+- (void)applicationWillTerminate:(NSNotification *)notification
+{
+ [Server stop];
+}
+
@end