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

Using go enums

I have this code below but im not sure how the enum's side of things is working with the input like how I can determine the case in the switch to activate. Any thoughts? ```go package validateInput import (...

Issue with throwing error

there is something confusing here in express how i got 200 response in the both cases if i find a book or not this is the error handler middleware ```js const errorhandler = (err, req, res, next) => {...
No description

Whats the best avaliable tutorial for laravel on the enternet today

Please give me a small description about the tutorial with its name

Go struct with methods to handle input. Good idea or Bad idea based on the given situation?

I have the following code below im deciding on either making it just a struct for input or creating a struct with methods to process individual input based on what the api takes. The api can take the following fields... ``` Query parameter based on which data is sent back. It could be following: ...

Pagination Firebase

Does anyone know how to implement pagination with firebase, with nextjs - react.

What's the best way to get the userId in prisma/AuthJs?

Is there a better way to do this? Because I should make a request everytime just to get the userId. How do you do it? I'd create a state to store it when the user logs in and then use POST and body to then get it in the server. Is that the best way to do it? ```js export async function POST(request: Request) { const session = await getServerSession(authOptions); ...

I can't make this work once i deploy

I'm trying to deploy this code on Vercel but is always not working, the only thing it said it was to put {"author":"my name"} in one part of the .json, after this, i tried to deploy and i can't manage to find a way to make this app run ): i'm trying this course from codecamp: https://www.freecodecamp.org/learn/back-end-development-and-apis/managing-packages-with-npm/how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package The application deployed: https://boilerplate-npm-9x5q.vercel.app/...

GitHub: git status: showing staged > deletions for already-deleted files, want to commit replacmnts

This is a GitHub question, so please forgive me if I'm not supposed to ask about Git Hub here.. I have a pre-made GH online repo for a react project, called "BuyNow" and it has been connected to my local repo folder such that I'm able to push and pull from it, from in terminal. ...
No description

Save images from file input in form POST method

So recently I've been learning express JS and wanted to do a simple project of making a website with a form. it will receive a name and an image. Show both after submitting the form. The problem lies in the file input in the form. I can grab the name of the file but I don't know how to download it and save it in an assets/gallery folder to later show it. Can anyone help? Thanks Below is the index.js code and also for added context I use hard coded array called gallery to store the data since I wanted to just focus on express and not deal with database for now. ...

need some pro backend instructions

Hii guys I'm working on project and I did some backend using node mongodb and javascript and I need to pro instructions pls

deploying reactjs app with backend on netlify

i have created a react app with express as backend technology now i want to deploy it on netlify but it seems that the process if different from deploying app without backend.

PHP Mysql speed

i have a database which have 2 columns but about 50M row, when i use only one where statment it will take about 12sec, how can i speed it up? my code like this SELECT id FROM tablename WHERE number=$number

Help with next.js 13.4

next.js 13.4 if i'm not wrong uses a revaledating thing, so my page is not in every request a fresh one, like i have a page (server component) and i got a mysql values and view them in the page, the page will not be fresh, as a specific time will gone, so how can i make a every single request will give me a fresh page? is there's a config or whatever cuz i see the docs and nothing helped me, thanks. and please mention me if you replied.

php

what the best ever course or tutorial for php on the internet ?

Is this JSON as data field in the db?

Hello I would like to ask how this is implemented in the database? this is a product description in shein and I want to do it in my project...
No description

help on nodejs smpp lib

Hello friends have anyone worked with node-smpp before? I am trying to receive an SMS from SMSC which came from users. deliver_sm is working fine for delivery receipt, so I can see deliver_sm PDU for the sent SMS and I am using the same event to receive SMS from SMSC but nothing is here regarding the received SMS. Can someone please help me with this? Thanks....

Reliable Node + React Deployment workflow

Okay So I am a Full stack developer. I usually make Frontend, and write the API's for my frontend on a node express server. I want to know what is the best way to deploy both the API and the Client app to the a remote site(or hosting) server using some workflow. I have tried Next, where you can create the Api in the same application, But I do not want that Kind of an implementation so I wont be using Next. I want to keep my Frontend and backend Seperate. I generally host my Frontend on Vercel as it handles the deployment smoothly, and easy to work with all the environment variables and such....

FILTERS

I am building a mini project, on a wine warehouse and as I do not have much knowledge in back-end I am in doubt of how I can do product search filters, for example the wine has the year, type of wine, region and how can I cosntrui a search bar that makes this filter by the database data.

DATABSE

Hey people, I would like to ask for advice, I have been learning front-end and for a personal mini project, I like to create a site that will be a mini wine warehouse for my friend, but for this I have to make a database, I do have a minimum knowledge of mysql and php, but whenever I did a project was on localhost, I never worked one with an online database, do not know how to put it safer or which platform to use it, someone manages me to do a mini guide than I need to create the database correctly, it is attention only a mini project does not need to be done in the most perfect way possible. I am very grateful to anyone who can help!...