Skip to content

Instantly share code, notes, and snippets.

@johnboiles
Created September 15, 2021 19:38
Show Gist options
  • Save johnboiles/a9f7edd927673f51c5dfc1460eb8cf1b to your computer and use it in GitHub Desktop.
Save johnboiles/a9f7edd927673f51c5dfc1460eb8cf1b to your computer and use it in GitHub Desktop.
Create a new Next.js Typescript web app on macOS

Make sure you have Node.js installed either from the nodejs.org page or via HomeBrew (brew install node).

You’ll also need yarn set up in order to run this code. You can get yarn with:

npm install -g yarn

Create a new Next.js app (it will prompt for a name)

yarn create next-app --typescript

Open your directory and run the server! (replace my-app with whatever you named your app)

cd my-app
yarn dev
open http://localhost:3000
@johnboiles
Copy link
Author

Also using VSCode for Typescript development is great (probably because VSCode itself is written in Typescript)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment