Browse Source

wait for 30 seconds for demo purposes

Kieran Gibb 3 years ago
parent
commit
160baea9ba
No account linked to committer's email address
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      example.js

+ 6
- 6
example.js View File

@@ -7,13 +7,13 @@ const drive = KappaDrive(storage)
7 7
 
8 8
 const mounter = Mount()
9 9
 
10
-var mounted = mounter.mount(drive, mountdir)
11
-
12 10
 drive.ready(() => {
13
-  mounted.then((destroy) => {
11
+  mounter.mount(drive, mountdir).then((destroy) => {
14 12
     // Drive is ready and mounted...
15
-
16
-    // To terminate the mount
17
-    mounter.cleanup(destroy, mountdir)
13
+    setTimeout(() => {
14
+      // Waiting 30 seconds for demonstration purposes
15
+      // then terminate the mount
16
+      mounter.cleanup(destroy, mountdir)
17
+    }, 30000)
18 18
   })
19 19
 })