A Nextjs starter project built with Typscript and TailwindCSS
create-next-app
.Inside the project directory run using npm
or yarn
:
dev
- runs the app in the development mode. Open http://localhost:3000 to view it in the browser.build
- builds the app for production to the build
folder.start
- Runs the built app in production mode.lint
- ESlint configured for Next. Use .eslintrc.json
to setup & .eslintignore
to ignore files.yarn dev
# or
npm run dev
Entry point pages/index.tsx
.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.tsx
.
The pages/api
directory mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Lint set according to Airbnb and NextJS style guides.
Prettier is set using my opinionated rules inside config file .prettierrc