0Pricing
Next.js 15 Fullstack Web Apps · Lección

Configuración del proyecto

Configure un nuevo proyecto de Next.js 15 con las herramientas más recientes y ajuste las opciones básicas para un desarrollo óptimo.

Configuración del proyecto es una lección gratuita de Next.js 15 Fullstack Web Apps en CoddyKit. Esta es la lección 2 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Next.js 15 Fullstack Web Apps, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Next.js 15 Fullstack Web Apps incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

Kickstarting Your Next.js Project

Time to spin up your first Next.js 15 app — prerequisites, the scaffolding tool, the file layout, and the dev server. This foundation matters.

Essential Tools: Node.js & npm

You need Node.js (the JS runtime for builds and the server) and npm, which ships with it. Check both: node -v and npm -v.

Creating Your First Next.js App

Scaffold a project with create-next-app. It asks about TypeScript, ESLint, Tailwind, and the App Router — which we will definitely use.

npx create-next-app@latest my-next-app --typescript --eslint --app --no-tailwind --import-alias "@/*"

Understanding Project Structure

Key files after scaffolding: app/ holds your routes and layouts, public/ serves static assets, and next.config.js configures the app.

Running the Development Server

Start the dev server with npm run dev from your project folder. You get hot reloading, so code changes show up in the browser instantly.

cd my-next-app
npm run dev

Your First Page: Hello, CoddyKit!

Visit http://localhost:3000 to see the welcome page, rendered from app/page.js — the React component for your app's root route.

// app/page.js
export default function Home() {
  return (
    <main>
      <h1>Hello, CoddyKit!</h1>
      <p>Your Next.js app is running.</p>
    </main>
  );
}

package.json: Project's Heartbeat

package.json is the project's heartbeat: name and version, the dev/build/start scripts, and your dependency list.

{
  "name": "my-next-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "next": "^15.0.0",
    "react": "^18",
    "react-dom": "^18"
  }
}

next.config.js: Customizing Next.js

next.config.js customizes your app — image domains, redirects, custom headers, webpack tweaks — by exporting a config object.

/** @type {import('next').NextConfig} */
const nextConfig = {
  // For example, enable React Strict Mode
  reactStrictMode: true,
  // Or configure image domains for `next/image`
  images: {
    domains: ['example.com', 'another-domain.com'],
  },
};

module.exports = nextConfig;

Environment Variables with .env

Use .env.local for environment variables like API keys. Anything prefixed NEXT_PUBLIC_ reaches the client; everything else stays server-only.

# .env.local
NEXT_PUBLIC_ANALYTICS_ID=UA-123456789-1
DATABASE_URL="postgresql://user:password@host:port/database"

Quick Check: Project Setup

Let's test your understanding of setting up a Next.js project.

Recap: Your Next.js Journey Begins!

You set up a Next.js 15 project: Node and npm, create-next-app, the app/ structure, the dev server, and the key config files. Routing next!

Preguntas frecuentes

¿La lección «Configuración del proyecto» es gratis?

Sí — el texto completo de «Configuración del proyecto» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Next.js 15 Fullstack Web Apps, actualiza a CoddyKit PRO. El curso de Next.js 15 Fullstack Web Apps incluye 4 lecciones en total.

¿Qué aprenderé en «Configuración del proyecto»?

Configure un nuevo proyecto de Next.js 15 con las herramientas más recientes y ajuste las opciones básicas para un desarrollo óptimo. Practicas Next.js 15 Fullstack Web Apps con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar Next.js 15 Fullstack Web Apps?

No se requiere experiencia previa. Next.js 15 Fullstack Web Apps en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 2 de 4.

¿Cuánto tiempo toma la lección «Configuración del proyecto»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de Next.js 15 Fullstack Web Apps?

Sí. Cada lección de Next.js 15 Fullstack Web Apps incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. Introducción a Next.js 15
  2. Configuración del proyecto
  3. Fundamentos de páginas, layouts y enrutamiento
  4. Metadatos, SEO y el encabezado del documento
← Volver a Next.js 15 Fullstack Web Apps