반응형 📍 Front-End/🜸 Next.js2 [Next.js] 페이지(Pages) 구성하기 Next.js 공식 문서에서 Getiing Started를 살펴보면 root 디렉터리에 있는데 /pages와 /public 디렉터리에 대해 안내되어 있다. Next.js 프로젝트를 구성하는데 중요한 첫 단계라 볼수 있는 pages 폴더 구성에 대해 알아봅시다! 1. Pages란? Next.js 프로젝트에서는 pages 디렉토리 하위에 생성되는. js,. jsx,. ts,. tsx 파일 명에 따라 자동으로 라우팅 된다. 예를 들어 아래와 같이 pages 하위에 about.tsx, notice.tsx 파일이 있다면 about.tsx는 localhost:3000/about notice.tsx는 localhost:3000/notice 로 접근이 가능해진다 pages ├── about.tsx ├── notice... 2022. 11. 27. [Next.js] Next.js 프로젝트 생성하기 시작하기에 앞서 Next.js의 공식 문서를 살펴보자 Getting Started | Next.js Get started with Next.js in the official documentation, and learn more about all our features! nextjs.org Next.js를 사용하기 위해서 Node.js 12.22.0 이상 버전이 설치되어 있어야 한다. Mac, Windows, Linux 모두 사용 가능! 참고로 저는 맥 유저랍니다. System Requirements Node.js 12.22.0 or later MacOS, Windows (including WSL), and Linux are supported 설치법은 여기를 클릭해주세요 1. create-next-app .. 2022. 8. 7. 이전 1 다음 반응형