Create a Next.js App with the create-next-app CLI

Jon Meyers
InstructorJon Meyers
Share this video with your friends

Social Share Links

Send Tweet
Published 10 months ago
Updated 7 months ago

Next.js is a full-stack React framework that provides the client and server building blocks to create powerful web applications. In this lesson we run the create-next-app CLI command to create a new Next.js application, configured with:

Code Snippets

Create Next.js app

npx create-next-app blue-bird

Resources

Instructor: We're going to use MPX to run the create-next-app package to create our new Next.js app. We're going to call this one blue-bird, and then this will step us through some questions to configure our project.

I'm going to use TypeScript. I do want ESLint. I want Tailwind CSS. I don't want to use the source directory. I do want to use the new app router, and I don't want to customise the default import alias. Once that's finished, we can change into our new directory and open it up in VS Code.

You can see we've got a starter project using the app directory with our index route that looks something like this. We can run npm run dev to start our development server, and if we navigate over to localhost over port 3000, we'll see the contents of that page.tsx file rendered in the browser.

egghead
egghead
~ 25 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today