Procházet zdrojové kódy

Tweaks

customisations
alemart před 2 měsíci
rodič
revize
47be69231e
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2
    3
      esbuild.mjs

+ 2
- 3
esbuild.mjs Zobrazit soubor

@@ -1,5 +1,4 @@
1 1
 import * as esbuild from 'esbuild';
2
-import path from 'path';
3 2
 import { readFile } from 'fs/promises';
4 3
 
5 4
 const argv = process.argv.slice(2);
@@ -45,8 +44,8 @@ await ctx.serve({
45 44
     host: '0.0.0.0',
46 45
     port: 8000,
47 46
     servedir: 'www',
48
-    keyfile: path.join(import.meta.dirname, '.local-server.key'),
49
-    certfile: path.join(import.meta.dirname, '.local-server.cert'),
47
+    keyfile: new URL('.local-server.key', import.meta.url).pathname,
48
+    certfile: new URL('.local-server.cert', import.meta.url).pathname,
50 49
 });
51 50
 
52 51
 function generateBanner()

Načítá se…
Zrušit
Uložit