From f6ffdfbe8fc0940ec0f85a51f5d5b96e1f05451c Mon Sep 17 00:00:00 2001 From: Michal Sapka Date: Thu, 4 Aug 2022 20:09:19 +0200 Subject: feature: blank next.js --- pages/_app.tsx | 8 ++++++ pages/api/hello.ts | 13 ++++++++++ pages/index.tsx | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 pages/_app.tsx create mode 100644 pages/api/hello.ts create mode 100644 pages/index.tsx (limited to 'pages') diff --git a/pages/_app.tsx b/pages/_app.tsx new file mode 100644 index 00000000..3f5c9d54 --- /dev/null +++ b/pages/_app.tsx @@ -0,0 +1,8 @@ +import '../styles/globals.css' +import type { AppProps } from 'next/app' + +function MyApp({ Component, pageProps }: AppProps) { + return +} + +export default MyApp diff --git a/pages/api/hello.ts b/pages/api/hello.ts new file mode 100644 index 00000000..f8bcc7e5 --- /dev/null +++ b/pages/api/hello.ts @@ -0,0 +1,13 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import type { NextApiRequest, NextApiResponse } from 'next' + +type Data = { + name: string +} + +export default function handler( + req: NextApiRequest, + res: NextApiResponse +) { + res.status(200).json({ name: 'John Doe' }) +} diff --git a/pages/index.tsx b/pages/index.tsx new file mode 100644 index 00000000..86b5b3b5 --- /dev/null +++ b/pages/index.tsx @@ -0,0 +1,72 @@ +import type { NextPage } from 'next' +import Head from 'next/head' +import Image from 'next/image' +import styles from '../styles/Home.module.css' + +const Home: NextPage = () => { + return ( +
+ + Create Next App + + + + +
+

+ Welcome to Next.js! +

+ +

+ Get started by editing{' '} + pages/index.tsx +

+ + +
+ + +
+ ) +} + +export default Home -- cgit v1.2.3