Quick start
Setup the environment variables
- Example: REACT_APP_DOMAIN_NAME=Nextstore
- Details: The REACT_APP_DOMAIN_NAME variable represents the domain name of your Nextstore e-commerce application. It is typically used for branding and displaying the name of your business on the website.
- Description: The URL of your domain where you have deployed the Nextstore application.
- Example: REACT_APP_BASE_URL=Nextstore.vercel.app
- Details: The REACT_APP_BASE_URL variable specifies the base URL of your Nextstore e-commerce application. It should point to the location where the application is deployed and accessible to users. Replace Nextstore.vercel.app in the example with the actual URL of your deployed application.
- Description: The Cloudinary cloud name associated with your Nextstore application.
- Example: REACT_APP_CLOUDINARY_CLOUD_NAME=Nextstore
- Details: The REACT_APP_CLOUDINARY_CLOUD_NAME variable is used to specify the Cloudinary cloud name associated with your Nextstore application. Cloudinary is a cloud-based media management platform used for handling images and other media assets. Replace techgater in the example with your actual Cloudinary cloud name.
- Description: The base currency used in your Nextstore e-commerce application.
- Example: REACT_APP_CURRENCY=USD
- Details: The REACT_APP_CURRENCY variable specifies the base currency used for product prices and transactions in your Nextstore application. It represents the default currency in which prices are displayed and transactions are processed. Replace USD in the example with your desired base currency code.
- Description: A flag indicating whether fast refresh is enabled or disabled.
- Example: FAST_REFRESH=false
- Details: The FAST_REFRESH variable determines whether fast refresh is enabled or disabled in your Nextstore application. Fast refresh is a feature of React that allows for quicker updates during development. Set this variable to true or false to enable or disable fast refresh, respectively.
- Description: The port number on which the Nextstore application runs.
- Example: PORT=3111
- Details: The PORT variable specifies the port number on which the Nextstore application is running. This variable is used to define the port for the local development server. Replace 3111 in the example with the desired port number for your application. Please note that the provided documentation assumes a Create React App (CRA) or similar setup for your Nextstore e-commerce script. Modify the instructions accordingly if you are using a different configuration or deployment setup.
Installation
To install the required node_modules and start the server for your Next.js front-end app, follow these steps:
- Open your terminal or command prompt.
- Navigate to the root directory of your front-end app where the package.json file is located.
-
Run the following command to install the required dependencies:
npm install
This command will read the package.json file and install all the necessary packages defined in the dependencies section.
- Wait for the installation process to complete. It may take some time depending on the number of dependencies and your internet connection speed.
-
Once the installation is finished, you can start the server by
running the following command:
npm start
This command starts the development server using the scripts defined in the package.json file.
- Wait for the server to start. You should see logs in the terminal indicating that the server has started successfully. It will typically mention the port number where your app is running (e.g., http://localhost:3000).
- Open your web browser and enter the URL shown in the terminal (e.g., http://localhost:3000).
- Congratulations! Your front-end app should now be running, and you can begin testing and interacting with it.
Note: Make sure you have Node.js installed on your machine before executing the above steps. You can download and install Node.js from the official Node.js website (https://nodejs.org).