18 lines
506 B
TypeScript
18 lines
506 B
TypeScript
|
|
import { readFile } from 'fs/promises';
|
||
|
|
import path from 'path';
|
||
|
|
|
||
|
|
export async function GET() {
|
||
|
|
const indexPath = path.join(process.cwd(), 'public', 'inspire-me', 'index.html');
|
||
|
|
const html = await readFile(indexPath, 'utf8');
|
||
|
|
const body = html.replace(
|
||
|
|
'<title>Inspire Me</title>',
|
||
|
|
'<base href="/inspire-me/">\n <title>Inspire Me</title>'
|
||
|
|
);
|
||
|
|
|
||
|
|
return new Response(body, {
|
||
|
|
headers: {
|
||
|
|
'Content-Type': 'text/html; charset=utf-8',
|
||
|
|
},
|
||
|
|
});
|
||
|
|
}
|