This project is a frontend application for an e-commerce website built using Next.js. This project serves as my initial learning project for Next.js.
https://nextjs-ecommerce-frontend.netlify.app/
- Home page showcasing featured products
- Product listing and details pages
Home Page - Showcase of featured products
Product Details - Example of a product detail page
To get a local copy up and running follow these simple steps.
- Node.js and npm installed on your local machine. You can download them from nodejs.org.
-
Clone the repository:
git clone https://github.com/your-username/ecommerce-frontend.git
-
Navigate to the project directory:
cd ecommerce-frontend
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev / npm run start
-
Open http://localhost:3000 in your browser to see results
To run this application using Docker, follow these steps:
- Ensure you have Docker installed. You can download it from Docker's official website.
-
Navigate to the project directory:
cd /path/to/your/project
-
Build the Docker image:
docker build -t ecommerce-frontend .
This command builds the Docker image with the tag ecommerce-frontend. The . denotes the current directory as the build context.
-
Running the docker container:
docker run -p 3000:3000 ecommerce-frontend
This command runs the container and maps port 3000 on your host machine to port 3000 in the container. Your application will be accessible at http://localhost:3000.
-
Find the running container ID or name:
docker ps
-
Stop the container:
docker stop <your_container_ID>
Replace <container_id_or_name> with the actual container ID or name obtained from the docker ps command.
Feel free to contribute to this by forking it, cloning or raising some issues for updation.