Skip to content

lirbank/nextjs-template

Repository files navigation

nextjs-template

This is a Next.js project bootstrapped with create-next-app and enahnced with my favorite configuration and tooling.

Recommendations

Prerequisites

  1. Install Node.js 18 and NPM 9 (using NVM)

  2. Check out this Git repo locally.

Getting started

You only have to do this the first time you set up the app.

  1. Run npm install or npm run deps-check to install dependencies

  2. Run npx vercel@latest link to link your local project to Vercel. This will enable you to automatically pull environment variables for development. nextjs-template is hosted under the Mikael Lirbank Vercel project as lirbank/nextjs-template. The development environment variables are pulled down from Vercel every time the app is started with npm run dev.

Start the development server

First, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Preconfigured packages and tools

Vercel configuration

Vercel will automatically run Prettier and tests (as well as ESLint) before building and deploying the app. No additional configuration is needed.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

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.

Scripts

  • npm run dev - Pull the latest developer environment variables from Vercel and start the development server
  • npm run build - Check Prettier formatting, run tests, and build the production app. This script is run by Vercel when deploying.
  • npm run start - Run the app built with npm run build
  • npm run lint - Link all files
  • npm run prettier - Format all files with Prettier
  • npm run test - Run tests in watch mode
  • npm run deps-check - Install dependencies and check for available updates
  • npm run deps-upgrade - Upgrade dependencies with minor and patch versions