Skip to content

krudi/react-template

Repository files navigation

react-template

A template with Next.js built on React with focus on performance and best practices.

Quick start

Note

You need to have Node.js installed on your computer before running this project.

  1. First clone this repository and navigate into your project directory
  2. copy .env-example .env - copy the .env file
  3. Install the dependencies: npm run install
  4. Run the development server: npm run dev

Starting development mode

To launch the project in development mode with hot module replacement.

  • npm run dev: to compile the React application and serve it to the browser
  • npm run dev:turbo: to compile faster in local development

You can view the development server at http://localhost:3000

Starting production mode

Build and optimize your application with Vite for production.

  • npm run build: build for production with minification

Exporting React project

Build the application, generate every route as a HTML file and statically export to directory.

  • npm run export: to generate static project files

Starting the project

Start the production server (after running npm run build).

  • npm run start: starts a web-server with a preview of your project

Commands for linting/fixing files

Navigate into your project directory and start linting your files.

  • npm run lint:eslint: lints JavaScript files
    • npm run lint:eslint:fix: to eliminate all possible errors
  • npm run lint:stylelint: lints Cascading Style Sheets files
    • npm run lint:stylelint:fix: to eliminate all possible errors

About

A template with Next.js built on React with focus on performance and best practices.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •