|
@@ -1,8 +1,9 @@
|
1
|
1
|
import * as esbuild from 'esbuild';
|
|
2
|
+import path from 'path';
|
2
|
3
|
import { readFile } from 'fs/promises';
|
3
|
4
|
|
4
|
5
|
const argv = process.argv.slice(2);
|
5
|
|
-const json = await readFile(new URL('package.json', import.meta.url));
|
|
6
|
+const json = await readFile(new URL('./package.json', import.meta.url), { encoding: 'utf8' });
|
6
|
7
|
const pack = JSON.parse(json);
|
7
|
8
|
const production = (argv.indexOf('--dev') < 0);
|
8
|
9
|
const minify = (argv.indexOf('--minify') >= 0);
|
|
@@ -44,6 +45,8 @@ await ctx.serve({
|
44
|
45
|
host: '0.0.0.0',
|
45
|
46
|
port: 8000,
|
46
|
47
|
servedir: 'www',
|
|
48
|
+ keyfile: path.join(import.meta.dirname, 'local-server.key'),
|
|
49
|
+ certfile: path.join(import.meta.dirname, 'local-server.cert'),
|
47
|
50
|
});
|
48
|
51
|
|
49
|
52
|
function generateBanner()
|