Skip to content

imaichiyyy/nextjs-boilerplate

Repository files navigation

This project is a boilerplate for Next.js.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

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

Function Description

The pages directory is mapped to /*. However, the pages/api directory is excluded.

API routes can accessed at http://localhost:3000/api/hello. This endpoint can edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

MSW as a mock server. A sample can found in pages/mock_samaple.tsx and src/mocks/ directory.

Formatter settings are .vscode/settings.json and .prettierrc.

Environment Variables

There are three types environment variables: dev, staging, and production. Environment Variables settings are set in src/env directory.

Build files

Running build commands for production files:

npm run build
# or
yarn build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published