Tremors
Tremors
KPCKevin Powell - Community
Created by Tremors on 8/2/2024 in #front-end
How to deploy a website with JSON Server and React
No description
3 replies
KPCKevin Powell - Community
Created by Tremors on 6/18/2023 in #front-end
My GeoLocation redirection code makes my website go in a infinite loading loop
This is the code for the geolocation function redirectBasedOnLocation() { // Make a request to the Geolocation API fetch('https://ipapi.co/json/') .then(response => response.json()) .then(data => { const country = data.country_code;
// Check if the visitor is from India (country code: IN) if (country === 'IN' && !redirected) { redirected = true; // Redirect to the India-specific page window.location.href = 'indexi.html'; console.log("Hello") } }) .catch(error => { // Handle any errors that occur during the API request console.error('Error:', error); }); }
// Call the function when the page loads document.addEventListener('DOMContentLoaded', redirectBasedOnLocation); My website just keeps on loading and dosent end. Some one please help
6 replies
KPCKevin Powell - Community
Created by Tremors on 12/26/2022 in #back-end
.save() is not working. Link is supposed to be added in the website url but dose not appear
I am trying to make a blog page with express, mongoose, node js. I have added the database but when using the .save() function it dosent generate a id needed in the website url
7 replies
KPCKevin Powell - Community
Created by Tremors on 10/23/2022 in #back-end
To try to find ip adress of person who visits my website
I have uploaded a website using cloudfare pages. I want to know the details of anybody who visits my page #console
2 replies