fix: bugs

This commit is contained in:
Kilu 2024-06-29 20:16:49 +08:00
parent 2b602f10cb
commit 3aabe7182d

View File

@ -3,8 +3,11 @@ const fs = require('fs');
const pino = require('pino');
const cheerio = require('cheerio');
const { fetch } = require('bun');
const { readFileSync } = require('node:fs');
const distDir = path.join(__dirname, 'dist');
const indexPath = path.join(distDir, 'index.html');
const logo = 'https://test.appflowy.com/appflowy.svg';
const setOrUpdateMetaTag = ($, selector, attribute, content) => {
if ($(selector).length === 0) {
$('head').append(`<meta ${attribute}="${selector.match(/\[(.*?)\]/)[1]}" content="${content}">`);
@ -60,7 +63,6 @@ const createServer = async (req) => {
const timer = logRequestTimer(req);
const reqUrl = new URL(req.url);
logger.info(`Request URL: ${reqUrl.pathname}`);
const logo = reqUrl.origin + '/appflowy.svg';
const [
namespace,