🚀 init: initial boilerplate
This commit is contained in:
9
pages/_app.tsx
Normal file
9
pages/_app.tsx
Normal file
@ -0,0 +1,9 @@
|
||||
import type { AppProps } from "next/app";
|
||||
|
||||
import "../styles/main.scss";
|
||||
|
||||
const MyApp = ({ Component, pageProps }: AppProps) => {
|
||||
return <Component {...pageProps} />;
|
||||
};
|
||||
|
||||
export default MyApp;
|
13
pages/api/hello.ts
Normal file
13
pages/api/hello.ts
Normal file
@ -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<Data>
|
||||
) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
}
|
7
pages/index.tsx
Normal file
7
pages/index.tsx
Normal file
@ -0,0 +1,7 @@
|
||||
import type { NextPage } from "next";
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return <></>;
|
||||
};
|
||||
|
||||
export default Home;
|
Reference in New Issue
Block a user