feat: add reload, stop and start in remote server

This commit is contained in:
Mauricio Siu
2024-09-09 23:46:24 -06:00
parent 95f75fdccb
commit 86f1bf31b8
14 changed files with 224 additions and 42 deletions

View File

@@ -0,0 +1,18 @@
import type { NextRequest } from "next/server";
import { renderToString } from "react-dom/server";
import Page418 from "../hola"; // Importa la página 418
export const GET = async (req: NextRequest) => {
// Renderiza el componente de la página 418 como HTML
const htmlContent = renderToString(Page418());
// Devuelve la respuesta con el código de estado HTTP 418
return new Response(htmlContent, {
headers: {
"Content-Type": "text/html",
},
status: 418,
});
};
export default GET;

View File

@@ -0,0 +1,3 @@
export default function hola() {
return <div>hola</div>;
}