Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.25 KB

File metadata and controls

60 lines (39 loc) · 1.25 KB

NextJS Tailwindcss Redux Boilerplate build with Vite

This is a NextJs boilerplate project to be used with Tailwindcss, Redux.

What is inside?

This project uses many tools like:

Getting Started

Install

Create the project.

npx degit https://github.com/devslane/nextjs-redux-tailwind-boilerplate my-app

Access the project directory.

cd my-app

Install dependencies.

yarn

Serve with hot reload at http://localhost:3000.

yarn run dev

Details

  • How to use .env variables ?

    • Add env variables to .env file (use .env.[development/production] as per your current environment)

    • Use NEXT_ prefix to your env variables to let vite compiler know that these variables can be publicly accessed.

    • This is as per personal choice. Use a separate env constant file to export the env variables.

const envConfig = {
    BACKEND_URL: process.env.NEXT_REACT_APP_BACKEND_URL!,
};

export default envConfig;