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

Forms and Site Security Help

Hi everyone! I have most of my site set up with just HTML and CSS, I want to add a form to receive some information such as Name, Phone Number and Email Address and have that emailed to me. I have a php setup for that, but I'm worried that having a form may create a vulnerability in my site and allow it to be hacked (it's happened before). How are you all preventing injection attacks and other exploits?

Where to put the admin dashboard of an e-commerce website?

I want to build an e-commerce website but I don’t know where to make the admin dashboard. Do I make it a separate website with a separate domain Or do I make it a separate website with sub-domain (ex. admin.myshop.con)...

Firebase Authentication

I'm trying to incorporate Firebase Authentication to handle simple email/password login to access members-only pages of a website, but although I've incorporated the code to block access to those pages for users who aren't logged in, I am still able to access those pages in a browser when not logged in. Anyone familiar with Firebase Authentication who could help walk me through it?

How do I make a download system for simple exe files

I have a game that I want downloaded when a button is clicked. I've done this using the download attribute for images. How would I do it for exe files, this is a very small game I'm talking about....

How can I get the string that console.log(obj); would print?

I'm using node.js and I'm familiar with util.inspect(obj) but it doesn't seem to stringify the same way as console.log(obj);, not by default, at least. How do I get a string in the same format as console.log(obj); would print? I'm asking because I'm using a logger (winston.js) and I want it to print objects this way.

Cookie with expiryDate gets deleted once session ends

Hello, I have some weird behavior I'm not sure I understand. So now the backend sends a set-cookie called refreshToken with the login, and it's working just fine as it does what it's meant to do. but the issue is that the cookie is removed every time a session ends. Even though it has an expiry of 3 months and I can see it correctly. What is it that I'm missing?...
No description

Need help hosting a backend service

Hey, does anyone have any experience with web hosting. I've tried my best but I think I'm missing something, and I've been stuck on this for far too long, I'd really appreciate if someone could help me with this. I have fastapi backend that I want to host using nginx for reverse proxy on an azure machine. Please help me out if you can.

date validation

when i insert the in database sometimes i got 00-00-0000

php error

I am working with xampp and mysql , i have created there a table with columns but when i insert data it says : MySQL returned an empty result set (i.e. zero rows). (Query took 0.0021 seconds.) <?php // Include the database connection file include '../database.php'; ...
No description

Seeking Free Online Resources for Backend Development

I have a good understanding of frontend development. I have also explored backend development but haven't been able to find any good resources for it on YouTube. Can someone help me find good, free online resources for backend development?

how link laravel project to composer ?

how can i link my laravel project to composer after buliding it from terminal ?

Seeking Free Online Resources for Backend Development

"I have a good understanding of frontend development. I have also explored backend development but haven't been able to find any good resources for it on YouTube. Can someone help me find good, free online resources for backend development?"

Connecting app.vue to index.ejs

Hi everyone. I'm having trouble integrating a Vue.js application into my index.ejs file. I am using vite and nodejs. Here are some details: Context: I'm trying to set up a Vue.js app on a index.ejs that takes an uplaoded image and shows it with a different style (so it is a dynamic thing), but the <div id="app"></div> remains empty. Issues Encountered:...
No description

How to get from string to anagram in fewest number of swaps?

I'm using Python for the backend of this project. I have a string l1 that is 19 characters long. I have a string l2 that is an anagram of l1 (l2 has the same characters as l1 but shuffled). I want to get from l1 to l2 in the fewest number of steps, the only move allowed is to swap any two letters (they don't have to be adjacent). l1 can have repeated letters. I'm trying to create a function that outputs the swaps the user needs to make to achieve the least possible number, represented as tuples with the indices of the letters the user needs to swap. For example, ```py l1 = "abc123456789abcdefg" l2 = "cca123456789bbadefg"...

Authentication with separate frontend and backend

Hi, I've had some attempts at creating a car marketplace app using React as frontend framework and Express on backend, but I dont know how to approach authentication. I don't want to use JWT's like every tutorial does, it seems to be exaggeration for my case. I've also tried using Spring for backend, but it's too complex. So, the question is: how to integrate frontend and backend session, so data is consistent(for example, when user changes name, the react app updates it). ...

Socket.io on backend and socket.io client on react front end issue

```js // front end import { io } from "socket.io-client"; const socket = io("http://localhost:3000");...

Multi-tenancy

Hello good folks. The purpose of this question is to get insight from the more experienced community. I'm trying to build a B2B system with data isolation concerns. For now, I chose to go with a schema-per-tenant data partition strategy. All tenants will share a common set of tables attached to their schema. But, the problem with this approach is the schema managment. To change even a single column across all schemas when you have many tenants is a challenge. I've tried an approach where I use drizzleORM to generate the "template" migration scripts. Then when a request comes in, I read the sql content from the file and replace the placeholder with the tenant's schema name. This works fine for creating new tenants. But the real problem now is global updates. I've not found a reliable way to do this so far....

Connect.sid in express using express-session

connect.sid in express session refreshes when I reload page, why... the id is same but just when timeout is reached, the connect.sid is destroyed but if I refresh page, it is regenerated, is that normal behaviour ?

Cookies not stored in postman when we use the front-end

I'm testing user session using postman. When I use postman to log in, a session is created and a cookie is stored. When I try to use the front-end to login, the cookie is created but isn't stored in postman, is this normal ?
Next