2 Commits

Author SHA1 Message Date
7d91eb64eb Merge branch 'v1.0.0-local' into debian12 2025-08-01 19:45:26 +02:00
a3df60178b changed ports 2025-08-01 01:09:58 +02:00
5 changed files with 33 additions and 68 deletions

View File

@@ -14,65 +14,23 @@ This is a simple weather application that allows users to view current weather d
## Installation ## Installation
### Prerequisites
To install and run this application, you need the following tools:
- Git (for cloning the repository)
**and**
- Node.js (v14 or higher)
- npm (Node Package Manager)
**or**
- Docker (for running the app in a container)
### 1st step - Get the source code
**You can either clone the repository or download the latest release. Keep in mind that the cloned version may contain bugs.**
1. Clone the repository: 1. Clone the repository:
```bash ```bash
git clone https://git.the1s.de/theis.gaedigk/weather-app.git git clone https://git.the1s.de/theis.gaedigk/weather-app.git
``` ```
2. Navigate to the frontend project directory:
**or**
1. Download the latest release from the [releases page](https://git.the1s.de/theis.gaedigk/weather-app/releases/latest).
2. Unzip the downloaded file to your desired location.
#### 2nd step - Using Node.js and npm
1. Navigate to the frontend project directory:
```bash ```bash
cd weather-app/frontend cd weather-app/frontend
``` ```
2. Install dependencies: 3. Install dependencies:
```bash ```bash
npm install npm install
``` ```
3. Start the development server: 4. Start the development server:
```bash ```bash
npm run dev npm run dev
``` ```
4. Open your browser and go to `http://localhost:7002` to view the app. 5. Open your browser and go to `http://localhost:7002` to view the app.
**Note:** There is also a backend server directory, which is currently not in use. - You can ignore it for now.
**or**
#### 2nd step - Using Docker
1. Navigate to the root path project directory:
```bash
cd weather-app
```
2. Run in a Docker container:
```bash
docker compose up -d --build
```
3. Open your browser and go to `http://localhost:7002` to view the app.
**Note:** There is also a backend server directory, which is currently not in use. - You can ignore it for now. **Note:** There is also a backend server directory, which is currently not in use. - You can ignore it for now.
## Usage ## Usage
@@ -95,4 +53,4 @@ To install and run this application, you need the following tools:
## Version ## Version
**v1.0.1-local** **1.0.0**

View File

@@ -1,20 +1,29 @@
services: services:
frontend: # frontend:
container_name: frontend # container_name: frontend
build: ./frontend # build: ./frontend
# network:
# - proxynet
# ports:
# - "7002:7002"
# environment:
# - CHOKIDAR_USEPOLLING=true
# volumes:
# - ./frontend:/app
# - /app/node_modules
# restart: unless-stopped
backend:
container_name: backend
build: ./backend
network:
- proxynet
ports: ports:
- "7002:7002" - "7001:7001"
environment:
- CHOKIDAR_USEPOLLING=true
volumes: volumes:
- ./frontend:/app - ./backend:/bikelane-backend
- /app/node_modules
restart: unless-stopped restart: unless-stopped
# backend:
# container_name: backend networks:
# build: ./backend proxynet:
# ports: external: true
# - "7001:7001"
#volumes:
# - ./backend:/bikelane-backend
# restart: unless-stopped

View File

@@ -9,4 +9,4 @@ COPY . .
EXPOSE 7002 EXPOSE 7002
CMD ["npm", "run", "dev"] CMD ["npm", "start"]

View File

@@ -64,7 +64,7 @@ const ChangeAPI: React.FC<Props> = ({ currentAPIKey, onClose }) => {
/> />
</div> </div>
<button <button
type="submit" type="button"
className="bg-gradient-to-r from-blue-600 to-blue-400 text-white font-bold px-6 py-3 rounded-xl shadow-lg hover:from-blue-700 hover:to-blue-500 transition-all" className="bg-gradient-to-r from-blue-600 to-blue-400 text-white font-bold px-6 py-3 rounded-xl shadow-lg hover:from-blue-700 hover:to-blue-500 transition-all"
onClick={handleUpdate} onClick={handleUpdate}
> >

View File

@@ -24,9 +24,7 @@ const WeatherData: React.FC = () => {
? "°C" ? "°C"
: localStorage.getItem("unit") === "imperial" : localStorage.getItem("unit") === "imperial"
? "°F" ? "°F"
: localStorage.getItem("unit") === "standard" : "K"}
? "K"
: "°C"}
</p> </p>
<p className="flex items-center justify-center gap-2"> <p className="flex items-center justify-center gap-2">
{weatherData?.sys?.country && ( {weatherData?.sys?.country && (