diff --git a/README.md b/README.md index c1c9fc0..9289469 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,14 @@ Would probably need to revamp everything, but didn't want to spend more time on ![Oscars Pool 2025](https://github.com/quoije/oscar-pool/blob/prod/img/preview.png) -**node .\index.js** \ No newline at end of file +## Setup +Config those in your .env file: + +**DOG_NAMES=**`woof, WOOF, Woof`     (for "verification")
+**GITHUB_OWNER=**`quoije`     (for version history)
+**GITHUB_REPO=**`oscars-pool`     (for version history)
+**JWT_SECRET=**`RANDOM STRING`     (for authentication token)
+**MONGO_URI=**`mongodb+srv://USER:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority&appName=Cluster69`
+**OMDB_API=**`1234567`     (for movie info) + +run with **node .\index.js** \ No newline at end of file diff --git a/public/checklist.html b/public/checklist.html index b526669..c377f34 100644 --- a/public/checklist.html +++ b/public/checklist.html @@ -5,6 +5,7 @@ Pool Oscars 2025 - Checklist + @@ -75,6 +54,7 @@ + \ No newline at end of file diff --git a/public/js/app_index.js b/public/js/app_index.js index 8097498..9d4649e 100644 --- a/public/js/app_index.js +++ b/public/js/app_index.js @@ -26,21 +26,4 @@ if (localStorage.getItem('auth_token')) { const error = await res.json(); alert(`${error.message}`); } - }); - - // Fetch version information from the API - async function fetchVersionInfo() { - const res = await fetch('/api/version'); - if (res.ok) { - const data = await res.json(); - // Update footer with the fetched version info - const footerText = `${data.date} - ${data.version} - ${data.message}`; - document.getElementById('footer-text').textContent = footerText; - } else { - document.getElementById('footer-text').textContent = ''; - } - } - - // Call the function to fetch and display the version info - // Doesn't work on prod, will fix later - fetchVersionInfo(); \ No newline at end of file + }); \ No newline at end of file diff --git a/public/js/app_version.js b/public/js/app_version.js new file mode 100644 index 0000000..618788b --- /dev/null +++ b/public/js/app_version.js @@ -0,0 +1,16 @@ + // Fetch version information from the API + async function fetchVersionInfo() { + const res = await fetch('/api/version'); + if (res.ok) { + const data = await res.json(); + // Update footer with the fetched version info + const footerText = `${data.date} - ${data.version} - ${data.message}`; + document.getElementById('footer-text').textContent = footerText; + } else { + document.getElementById('footer-text').textContent = ''; + } + } + + // Call the function to fetch and display the version info + // Doesn't work on prod, will fix later + fetchVersionInfo(); \ No newline at end of file diff --git a/public/movies.html b/public/movies.html index e561568..4ff5f50 100644 --- a/public/movies.html +++ b/public/movies.html @@ -5,6 +5,7 @@ Pool Oscars 2025 - Films +