Getting Started with Next.js 14
A comprehensive guide to setting up your first Next.js 14 project, from installation to deployment.
Introduction
Next.js is a powerful React framework that enables features such as server-side rendering and generating static websites. This tutorial will walk you through the process of creating a new Next.js 14 application.
Prerequisites
- Node.js 18.17 or later
- npm, yarn, or pnpm
Step 1: Create a new project
Open your terminal and run the following command:
npx create-next-app@latest
You'll be prompted with a few questions. For this tutorial, we'll use the following settings:
- What is your project named?
my-next-app
- Would you like to use TypeScript? Yes
- Would you like to use ESLint? Yes
- Would you like to use Tailwind CSS? Yes
- Would you like to use
src/
directory? Yes - Would you like to use App Router? Yes
- Would you like to customize the default import alias? No
Step 2: Run the development server
Once the installation is complete, navigate into your new project directory and start the development server:
cd my-next-app
npm run dev
Open http://localhost:3000 with your browser to see the result.
You are now ready to start building your application!