KSI일기장
NodeJs , Next.js 시작(설치 및 실행) 본문
1. 먼저 visual studio code 와 nodeJs를 설치해 줍니다.
https://code.visualstudio.com/download
Download Visual Studio Code - Mac, Linux, Windows
Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.
code.visualstudio.com
Node.js — Run JavaScript Everywhere
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
2. visual studio code 열고 임의의 폴더 생성해 줍니다.
3. 터미널에서 명령어 next js를 설치해 줍니다.
- 설치 명령어 입력 전 생성한 폴더(next js를 설치할 폴더)에 아래와 같이 들어가줍니다.
- npx create-next-app@latest 라는 명령어 입력하고 아래 이미지와 같이
No / Yes를 설정을 해줍니다.
*****설정잘못하면 재설치 해야하니 주의*****
4. 설치 후 실행을 위해서는 터미널에 npm run dev를 입력해 줍니다.
입력 후 url이 http://localhost:3000 이라고 나올텐데 들어가줍니다.
에러없이 아래와 같이 나오면 성공입니다.