jusju / shoppinglist-frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shoppinglist Frontend

This is the frontend application for the shoppinglist project. It is developed with JavaScript, React and Vite. We also have support for Docker and Docker Compose.

Run locally in development mode

cd shoppinglist-frontend
npm start

How to change backend API URL

Create .env file to the project root

Add the following line to the file

VITE_API_URL=YOURAPIURL

Replace YOURAPIURL with the actual API URL.

How to run with Docker

The easiest way is to use Docker Compose. It uses the docker-compose.yml file found in the repository root.

cd shoppinglist-frontend
docker compose up -d

The application will be available in port 5173.

The container has Nginx web server running on Alpine Linux. It is much more minimal than running a Node runtime inside the container.

Stop the application

docker compose down

Alternatively, there is a Dockerfile to run the application with Node runtime.

Build the image

cd shoppinglist-frontend
docker build -t shoppinglist .

Create a container and run it

docker run --rm -p 5173:3000 shoppinglist

About

License:MIT License


Languages

Language:JavaScript 86.0%Language:CSS 12.3%Language:Dockerfile 0.9%Language:HTML 0.8%