frontend
├── next.config.mjs
├── next-env.d.ts
├── package.json
├── package-lock.json
├── postcss.config.mjs
├── README.md
├── src
│ └── pages
│ ├── _app.tsx
│ └── index.tsx
├── tailwind.config.ts
└── tsconfig.json
Open your terminal and run the following commands:
mkdir ChitChat
cd ChitChat
Create a new Next.js app without TypeScript:
npx create-next-app frontend
cd frontend
Delete the src or app directory if it
exists, as well as the styles directory:
rm -rf src styles
mkdir src
Inside the src directory, create a new
pages directory:
mkdir src/pages
Inside the pages directory, create a file called
index.js:
touch src/pages/index.js
Open src/pages/index.js and add the following code:
const Home = () => {
return (
<div>
<h1>Hello Home Page</h1>
<p>Welcome to ChitChat!</p>
</div>
);
};
export default Home;
You can now start your development server:
npm run dev
It will display "Hello Home Page" at
http://localhost:3000. You can add more HTML
components as needed directly in the JSX format.