Kevin Powell - Community

KPC

Kevin Powell - Community

Join the community to ask questions about Kevin Powell - Community and get answers from other members.

Join

front-end

resources

back-end

ui-ux

os-and-tools

Where to go for free 'KeyValue' DB storage?

Anyone have any recommendations RE the AWS ecosystem for image storage? I've been looking into cloud storage NoSQL services like AWS, to create a NoSQL db to hold fake 'inventory' and 'stock' images of a fake car website that I'm coding. I'd like to integrate my own metadata objects around these free, publicly-sourced images (.webp ), just to ensure maximum searchability on my site and in general. So I'm looking at using a 'Document Store' NoSQL db, like MongoDB, and feeding it .json objects that have my custom metadata along with the image binary. This can be done for free with AWS's DynamoDB, however, that platform places a 400kb cap on images, which is like, meh. ...
No description

SQLite checkboxes how to?

Hello, I am wondering how to store more checkbox datas with checkbox only no submit button or else? So, when checkbox changeing, change the database straight away. No need to push submit button, or anything else....

Having issue with error types in TypeScript

`async function getUserById(req: Request, res: Response) { const userId = parseInt(req.params.id); try { const user = await prisma.user.findUniqueOrThrow({ where: {...

Socket.emit() and socket.on() not working when app is refreshed?

hey guys so im currently using socket.io for a real time chat app and my issue is that i have a useEffect which runs only on component mount okay and that fires socket.connect() and then socket.emits an event but for some reason when i refresh the app the component mounts right? and that should fire the emit event right? but it doesnt? its not received in the backend for some reason ive added console.logs to ensure my useEffect runs and it does but in the backend i dont get any logs from the event it should catch 😦 now it does work when i visit another component and get back to the component that has the socket event but for some reason it doesn't work on app refresh in the browser ...

ERR_TOO_MANY_REDIRECTS? How can I fix it?

I created web, everything was working but wasn't secured. so I create SSL certificate and I get that error. trying to change http to https . I delete all cookies on browser and all recommending think what I find but nothing help. I think that will be something on my server. It is my first website, any help will appreciate....
No description

Real-time payment notification for websites

Has anyone here ever built a site with real-time payment notification i.e when people come to your site they can see a notification on the bottom right corner of their screen that says e.g "John from London paid £50". I'm building a charity site....it encourages others to donate but I'm looking for a SAAS that already does that so I'll connect my site to the software so it can listen to triggers from Stripe and execute. Does anyone know a software that does that?

Embedded Email Image Does Not Show Up

I don't know why the image does not displayed. ```cs string wwwRootPath = _webHostEnvironment.WebRootPath; string imagePath = Path.Combine(wwwRootPath, "images", "HappyBirthdayCard.jpeg");...
No description

RETS and RESO feeds and SSO (Single-Sign-On)

Hello, Everyone. Who have the skills and experience for the RETS and RESO feeds and SSO (Single-Sign-On)...

What is the correct way to store data?

Hello, I would like to ask what is the correct way to store data in this case? Local storage or sqlite? Simple to do list, no personal data Site should have to sore checkbox checked or not. That's all....

Problem understanding Callback

I understand how to use aynsc/await to fetch data form an api (Example="https://randomuser.me/api") but i cant seem to do the same with callbacks. Are callbacks still being .I do understand the use of .then and how to use callback but in practical i fail to implement it...

Error in connection to DB

Hey, please see image I'm receiving this error and I can't for the life of me figure out what is going wrong: Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':title, content = :content WHERE id = :id' at line 1 in C:\laragon\www\H8-prikbord\backend\berichtenController.php:33 Stack trace: #0 C:\laragon\www\H8-prikbord\backend\berichtenController.php(33): PDOStatement->execute(Array) #1 {main} thrown in C:\laragon\www\H8-prikbord\backend\berichtenController.php on line 33...
No description

websocket 404 issue after deploying to fly.io

It works fine locally, but it returns a 404/301 error when deployed to fly.io. Do you guys have any ideas about this issue? Thanks in advance!...
No description

fetch fails with ETIMEOUT

I am learning node and in this tutorial's https://nodejs.org/en/learn/manipulating-files/reading-files-with-nodejs last sippet they are fetching a txt file from a url. However I keep getting this error ```ganesh@LAPTOP-G6NM8GVN:~/repos/node-practice$ node app.js Debugger attached....

How to delete objects from `notifications` array after certain amount of time in mongoDB?

```js const addToNotifications = await db.collection("notifications").findOneAndUpdate( { author: body.author }, { $addToSet: {...

sending first data in mongodb

hi guys in what cases in this const registration = async (req, res) => { try { console.log(req.body);...

Quick question about date and string types

I have a date property (e.g: createdAt) from the backend. I'm sending it to the frontend as JSON data. Since JSON only works with strings, what's a good way to handle this as my TypeScript definitions are Dates. Should I rewrite my types to take Date | string or should I make some type of parsing function? I feel like if I make it a Date | string, it'll be a bit ambiguous. I have multiple functions in the frontend that handle the createdAt as a Date, no parsing method needed. But when I get the createdAt from the backend, I'll need to know it's from the backend and parse it as a date in the frontend. Does that make sense? I'm trying to word it but I guess what I'm trying to get at is it might not be 'standardized' when working with it in the frontend. Typing that out, I realize what I could potentially do is rework my frontend methods that use createdAt to get the data from the backend, now that I actually have it setup, that way it'll be in a standardized format...

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)...
Next