Spaces:
Paused
Paused
Update start.js
Browse files
start.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
const
|
| 6 |
-
|
| 7 |
-
const https = false
|
| 8 |
-
const server = new WebDAVServer
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
});
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 1 |
+
// Proxy mode, multi user
|
| 2 |
+
|
| 3 |
+
import { WebDAVServer } from "@filen/webdav";
|
| 4 |
+
|
| 5 |
+
const hostname = "0.0.0.0";
|
| 6 |
+
const port = 8080;
|
| 7 |
+
const https = false;
|
| 8 |
+
const server = new WebDAVServer({
|
| 9 |
+
hostname,
|
| 10 |
+
port,
|
| 11 |
+
https,
|
| 12 |
+
// Omit the user object
|
| 13 |
+
authMode: "basic" // Only basic auth is supported in proxy mode
|
| 14 |
});
|
| 15 |
+
|
| 16 |
+
await server.start();
|
| 17 |
+
|
| 18 |
+
console.log(
|
| 19 |
+
`WebDAV server started on ${https ? "https" : "http"}://${hostname === "0.0.0.0" ? "local.webdav.filen.io" : hostname}:${port}`
|
| 20 |
+
);
|