- Create project
npx create-next-app project_name
- To check commands
/package.json
inscripts
- To run project on local use
yarn dev
- To build project use
yarn build
Enviroment
- Same code but different data -- Test -- Production (Live)
Deployment
- Uploading changes on local project live on host website
- Vercel (hosting platform)
- Push to Github > Vercel will automatically deploy > Vercel will install dependencies
Process of Deployment
- Build project locally
yarn build
- Upload build files to host website
- Host website will run build files
File Structure & Path
- .next (files next js)
- node_modules / Packages
- public (static files - images, fonts, etc)
- src -- pages ---- index.js -- styles
- eslint
syntax checker
- gitignore
git will ignore these files
- jsconfig.json
for shortcut of path
- next.config.js
for custom configuration
- package.json
dependencies