You can run this app with docker or without docker. First, clone this repository. Replace "folder_name" with whatever you want.
$ git clone https://github.com/akarX23/react-redux-next-tailwind-pwa-template.git folder_name
$ cd folder_name
$ sudo docker build -t image_name .
It will take some time to build the docker image. Once it's complete you can run the following command and specify a port to run the app. We will be using port 5000.
docker run -dp 5000:3000 image_name
This will run the app in detached mode, which means you don't need to keep your terminal open to access the app. Once it's up and running, you can access the app on http://localhost:5000
$ npm install
$ npm run dev
This will run the development server on port 3000. You can access the app on http://localhost:3000. Any changes you make in the app will be visible on the site with hot-reload.
The theme for this project is defined in two files:
/tailwind.config.js
/helpers/theme.js
The first theme is for Tailwind. The second theme is for Material UI. It's advised to keep the theme consistent throughout the app. Make sure in both the places the values are same.
By default the service worker is enabled. If you don't want your app to be a PWA go to /next.config.js
and set register : false
. Restart your app to see the changes.
Ritik Agrawal.