From 31939aaffe8da411f65ce2417d87d30decb01240 Mon Sep 17 00:00:00 2001 From: TylerP33 Date: Thu, 21 Mar 2024 11:43:15 -0500 Subject: [PATCH] removed client --- Dockerfile | 2 -- docker-compose.yaml | 6 ------ index.html | 21 --------------------- scripts/index.js | 40 ---------------------------------------- styles/index.css | 41 ----------------------------------------- 5 files changed, 110 deletions(-) delete mode 100644 Dockerfile delete mode 100644 index.html delete mode 100644 scripts/index.js delete mode 100644 styles/index.css diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6e8acef..0000000 --- a/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM nginx:alpine -COPY . /usr/share/nginx/html diff --git a/docker-compose.yaml b/docker-compose.yaml index 4d4e26a..67c4c6f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,5 @@ version: "3.8" services: - app: - build: . - ports: - - "8000:80" - volumes: - - .:/usr/share/nginx/html api: build: ./api ports: diff --git a/index.html b/index.html deleted file mode 100644 index 8fd3f17..0000000 --- a/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Average eBay Price - - - -
-
-
- Enter Product Code - - -
-
-
- - - \ No newline at end of file diff --git a/scripts/index.js b/scripts/index.js deleted file mode 100644 index dd6c2bc..0000000 --- a/scripts/index.js +++ /dev/null @@ -1,40 +0,0 @@ -window.addEventListener("load", function () { - const form = document.querySelector("form"); - - // Function to handle form submission - async function handleSubmit(event) { - event.preventDefault(); - - // Get the value entered in the input field - const productCode = document.getElementById("productCode").value; - try { - // Send POST request to server - const response = await fetch("http://localhost:3000/api/item-lookup", { - method: "POST", - headers: { - "Content-Type": "application/json", // Indicate that the request body is JSON - }, - body: JSON.stringify({ productCode }), - }); - - if (!response.ok) { - throw new Error( - `Network response was not ok, status: ${response.status}` - ); - } - - // Optional: Handle JSON response data here - // const data = await response.json(); - // console.log(data); - - console.log("Data submitted successfully"); - // Optional: Update UI to reflect success - } catch (error) { - console.error("Error submitting data:", error); - // Optional: Update UI to reflect error - } - } - - // Add event listener to the form's submit event - form.addEventListener("submit", handleSubmit); -}); diff --git a/styles/index.css b/styles/index.css deleted file mode 100644 index d6a1a0d..0000000 --- a/styles/index.css +++ /dev/null @@ -1,41 +0,0 @@ -body{ - display: flex; - margin: 2rem; - width: 100%; - height: 100%; - justify-content: center; - background-color: snow; - font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; -} - -input{ - border: solid teal 2px; -} - -input:hover{ - box-shadow: 0 0 2px 2px teal; - outline-color: none; -} - -input:focus{ - box-shadow: 0 0 2px 2px orange; -} - -fieldset{ - box-shadow: 0 0 10px 2px white; - border-radius: 4px; - color: teal; - border: solid teal 2px; -} - -legend{ - background-color: snow; -} - -button{ - background-color: teal; - color: white; - border-radius: 4px; - font-weight: 700; - cursor: pointer !important; -} \ No newline at end of file