|
@ -17,13 +17,13 @@ const distDir = path.join(__dirname, 'client'); |
|
|
const trim = (str: string): string => str.replace(/\/*$/, ''); |
|
|
const trim = (str: string): string => str.replace(/\/*$/, ''); |
|
|
|
|
|
|
|
|
export default function createServer( |
|
|
export default function createServer( |
|
|
{ base, port, host }: Server, |
|
|
{ base, port, host, title }: Server, |
|
|
{ key, cert }: SSLBuffer |
|
|
{ key, cert }: SSLBuffer |
|
|
): SocketIO.Server { |
|
|
): SocketIO.Server { |
|
|
const basePath = trim(base); |
|
|
const basePath = trim(base); |
|
|
events.emit( |
|
|
events.emit( |
|
|
'debug', |
|
|
'debug', |
|
|
`key: ${key}, cert: ${cert}, port: ${port}, base: ${base}` |
|
|
`key: ${key}, cert: ${cert}, port: ${port}, base: ${base}, title: ${title}` |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const html = ( |
|
|
const html = ( |
|
@ -36,7 +36,7 @@ export default function createServer( |
|
|
<meta charset="UTF-8"> |
|
|
<meta charset="UTF-8"> |
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
|
|
<title>WeTTy - The Web Terminal Emulator</title> |
|
|
<title>${title}</title> |
|
|
<link rel="stylesheet" href="${basePath}/public/index.css" /> |
|
|
<link rel="stylesheet" href="${basePath}/public/index.css" /> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|