This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm install
# or
yarn install
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Enforce code style and maintain code quality - "Fail Fast and Early"
Tutorial:
- Jarrod Watts - How To Setup Next.JS with TypeScript, Prettier, ESLint and Husky
- Joshchu - How to setup Prettier, ESLint, Husky and Lint-Staged with a NextJS and Typescript Project
- Alexandre C. - Improve your Next.js 11+ project code quality with Typescript, Eslint, Husky, and Lint-staged
Unit testing
Tutorial:
- Vercel - Next.js Testing documentation
- Maciek Grzybek - Setup Next.js with Typescript , Jest and React Testing Library
- Mateusz Hadryś - Boilerplate and Starter for Next JS 12+, Tailwind CSS 3 and TypeScript
- Harsh Verma - Automated Code Linting and Testing
Automate builds, tests, and deployments - DevOps software development practice
Tutorial:
- Fikayo Adepoju - Continuous integration for Next.js applications
- CircleCI - Configuring a Node.js Application on CircleCI
- David Adeneye - A guide to continuous integration in Next.js
- CircleCI - Using the Docker execution environment
- Vercel - Continuous Integration (CI) Build Caching
- Fikayo Adepoju - Continuous deployment for Next.js applications
- Marcos Henrique da Silva - Your scaffold for CircleCI + Automated Tests + NestJS
- Calvin Cheng - Gist: Example deploy using vercel token
- Vercel - What's the correct way to deploy from another CI system such as circle ci?
Pre-requisite: Connect your repository to Vercel through Vercel dashboard
Install Vercel CLI:
npm install -g vercel
Retrieve VERCEL_PROJECT_ID
and VERCEL_ORG_ID
:
It should generate a .vercel
folder and the tokens can be found in the project.json
file.
vercel link
Create environment variables in Circle CI project settings:
VERCEL_PROJECT_ID: [projId in [path]/vercel/project.json]
VERCEL_ORG_ID: [orgId in [path]/vercel/project.json]
VERCEL_ACCESS_TOKEN: [generate through vercel account settings]