commit 038f9a9ab1f8e7c59169649a5700f93c29608534 Author: AI Generator Date: Fri Feb 20 16:21:55 2026 +0000 Initial commit by AI Generator diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f973c69 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/index.html b/index.html new file mode 100644 index 0000000..5444fed --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +Todo
\ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..180a31b --- /dev/null +++ b/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri $uri/ /index.html; + } + gzip on; + gzip_types text/plain text/css application/json application/javascript; +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e4df761 --- /dev/null +++ b/package.json @@ -0,0 +1 @@ +{"name":"todo-app","type":"module","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"devDependencies":{"@vitejs/plugin-react":"^4.2.1","vite":"^5.0.0"},"scripts":{"dev":"vite","build":"vite build"}} \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..014f5e7 --- /dev/null +++ b/src/App.jsx @@ -0,0 +1 @@ +import React,{useState} from "react"; export default function App(){const[t,s]=useState([]);const[v,sv]=useState("");return(

Todo App

sv(e.target.value)} placeholder="Nowe zadanie"/>
)} \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx new file mode 100644 index 0000000..fb6a285 --- /dev/null +++ b/src/main.jsx @@ -0,0 +1 @@ +import React from "react"; import ReactDOM from "react-dom/client"; import App from "./App.jsx"; ReactDOM.createRoot(document.getElementById("root")).render(); \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..3add52c --- /dev/null +++ b/vite.config.js @@ -0,0 +1 @@ +import {defineConfig} from "vite"; import react from "@vitejs/plugin-react"; export default defineConfig({plugins:[react()]}) \ No newline at end of file