Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time πŸ™‚.

Join

front-end

resources

back-end

ui-ux

os-and-tools

how to add params in useEffect axios get request

Backend code : ```js routes.get('/delivery/hotel/:hotelname',(req,res)=>{...

Get IP Address

Hi Everyone what api do you recommend in geting IP Address. I tried https://api.ipify.org but not working if I use android device or IOS device. only working on Web

Api Access and Youtube Statistic

Hey guys I have questions regarding how to build statistic based website by connecting with youtubes api ( like viewstats.com or socialblade.com) I am new to this topic, my main objective is to create a website where I can access youtubes data and be able to catagorize channels based on thei video topic views etc. I'm having problems like, connect to data base, how to use api to manupulate those data etc....

Error in .cs of Webform

im trying to solve this error on Line 8 ,what is it , How do i solve?
No description

ACF pro Wordpress

Is it possible to create a field that could be used on all pages and posts but still being able to change to content on one, but not on all pages? For eg. I want to create a field for a header image that displays on all pages and posts (except homepage), but I want to be able to change the image on particular page, I don't want them to change simultaneously on all of them. Makes sense? Ideas?...

The values of the object data messageData are not showing in the terminal of the server

Hello, please I need help in solving this issue in a fullstack chat-app project. So, the values of the object data in the async function sendMessage() are not showing in the terminal of my server from the event β€˜send_message’. Please how can I solve this? project: https://github.com/kenekc18/Chat_app...
No description

Unexpected token is not valid JSON

SyntaxError: Unexpected token 'e', "ee-square.jpg" is not valid JSON Before all, I want to say I am beginner to back end. How can be fixed this syntax error? Explications are welcome, I wanna understand why I broke the add image cover input and and working with these files....
No description

Need Help With Cookie

I'm generating a token when the user logs in, & sending it to the browser, but the catch is cookie is present in the network tab (as a login response) But it is not getting added to the Application > Storage > Cookies So whenever I refresh, I keep getting logout as the cookie is not present in the req.cookies.COOKIE_NAME. ...
No description

How to fix this error: app crashed - waiting for file changes before starting?

As a beginner, I followed a webdevsimplified course. I can not fix this error -> [nodemon] app crashed - waiting for file changes before starting... I attach also a photo if it helps....
No description

How to fix CORS error in Next.js?

```ts export async function POST(req: NextRequest) { // req.headers.set("Access-Control-Allow-Origin", "http://localhost:3000/") req.headers.set("Access-Control-Allow-Origin", "") req.headers.set("Access-Control-Allow-Methods", "")...
No description

How do I make an array from specific keys in another array?

OK, I'm exhausted after spending 10 hours researching and testing, but to no avail. I have an array, which is along the lines of ... ``` [ - {...

Rust and Svelte Oauth2 bewilderment

It took me a while to figure out what I am asking here, I think it is: does authjs work on static svelte? And are the rest of my lib decisions applicable to this situation? I am researching creating a web app that authorises with Google Oauth2 (or some other provider). I plan to use Rust for the backend and a staticly hosted Svelte application for the frontend. For the Rust side of things, I want to use a MongoDB database with it's official driver, Axum for the web framework and OpenIDConnect-rs to handle Oauth on the backend. For the frontend I plan to use AuthJS for oauth. All in all, I feel like I am severely missunderstanding something seeing how the documentation for all the auth related packages is worded. Would someone be able to show if a static svelte site can work for the frontend (and why not if it can't) as well as how the oauth packages communicate as I feel I must be still missing something even after watching a lot of videos and reading docs....

any advise on web hosting

i have made a tutoring website that has a domain and is live using github pages which is static. im using the MERN stack. what do i have to do in order for people to use it dynamically as in like be able to sign up so that the data stays in the database with out the localhost and stuff like that? i did some research i saw that i need to host it on a server for the website to be dynamic. i saw that for node projects its better to use Virtual Privet Server or VPS Hosting, is this true? if so where...

better_sqlite3.nodewas compiled against a different Node.js version

Hey, I'm going through a react udemy course by Maximilian SchwarzmΓΌller. In NextJs section, he is using Better-Sqlite3 to make a database for a project. I tried copying what he showed as it is but i'm getting an error and their support is non-existent on udemy and discord, can you help with it He wrote a initdb.js file to make that database intialize, but when i use node initdb.js to run it, i get an error ...

CMS that only interacts with a exisiting Database?

So most Headless CMS come or connect to a database on the backend and the Headless CMS than creates API endpoints that you can than access from your Frontend to get the content into your site. Since Pocketbase, Supabase, Firebase offer such great integrated backend solutions with Auth, DB, API endpoints - I am now wondering if there is a Headless CMS that only acts as a frontend for updating such a BaaS system. Since Pocketbase offers an API for my site to get content, I only really need the CMS to do CRUD operation on tables via the API that Pocketbase offers and it doesn't need to create a API for the frontend, since Pocketbase/Supabase already offer that....

Need Help in typescript for extending the express Response Object

Hello There, ``` Code export interface CustomResponse extends Response { success: (statusCode: number, data: any, message?: string, records?: string) => Response; error: (statusCode: number, error: any, message: string) => Response;...

Can netlify host nodejs websites that use mongodb for free?

I have a website with a comment section that uses nodejs and mongodb, will netlify be able to host it for free?

SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON

const ProfileEditPage = () => { useEffect(() => { fetch('/edit').then(response => response.json()).then(data => console.log(data)).catch(err => console.error(err)); }, []) ...
No description