feat(server): add safety checks during dev (#1489)

Co-authored-by: Reed von Redwitz <reed+github@vonredwitz.com>
This commit is contained in:
Michael Herzner
2023-07-31 11:48:26 +02:00
committed by GitHub
co-authored by Reed von Redwitz
parent 430be774e2
commit a7fe9d04f1
20 changed files with 398 additions and 18 deletions
+9
View File
@@ -0,0 +1,9 @@
import { AppProps } from "$fresh/server.ts";
export function App(props: AppProps) {
return (
<>
<props.Component />
</>
);
}
@@ -0,0 +1,5 @@
export const handler = {
GET() {
return new Response("This is from the handler!");
},
};
@@ -0,0 +1,3 @@
export default function Home(): null {
throw new Error("boom!");
}
@@ -0,0 +1,9 @@
import { AppProps } from "$fresh/server.ts";
export default function App(props: AppProps) {
return (
<>
<props.Component />
</>
);
}
+3
View File
@@ -0,0 +1,3 @@
export function Test() {
return <div>hello</div>;
}
@@ -0,0 +1,3 @@
export default function Test() {
return <div>hello</div>;
}