raul-barriga
raul-barriga
KPCKevin Powell - Community
Created by raul-barriga on 9/15/2024 in #back-end
sendgrid email
If sendgrid is used with a client contact form, where would the user's email be placed in the sendgrid object you're sending? A lot of examples use hard coded values, while most real world scenarios will need to be dynamic data like from a contact us form. Where does your verified email go & where does the user's email go?
2 replies
KPCKevin Powell - Community
Created by raul-barriga on 8/31/2024 in #ui-ux
Web Design UI Cards
Figured I'd post here since my questionis more of a web design/web dev layout question for UI cards. https://codesandbox.io/p/devbox/25jh2p I'm using tailwind css with next.js and I've created a services section for a website. This services section has a subheading with 3 responsive UI cards under. Below these UI cards is another subheading with 2 rows of UI cards of more content, separated into 3 columns like those cards under the 1st heading. My issue is that I have a final subheading with not 3, but 4 cards now and I don't know how to lay them out. 1) I can have 3 columns like before, with the last card creating a separate row by itself. 2) create a different layout for these last 4 cards by centering them & breaking them up into 2 by 2 (2 cards per column & 2 per row). All the cards are already responsive so that won't change.
1 replies
KPCKevin Powell - Community
Created by raul-barriga on 10/19/2023 in #front-end
Next.js click outside together with toggler
I have this component called DateRangerPicker that opens when I click on an input tag's onClick. The input tag's component is outside the DateRangerPicker & not a child of it. I wanted to have a hook to be able to close the DateRangerPicker when I click outside of it while also being able to toggle it close using the same input tag. However, since the input tag is outside the DateRangerPicker, it gets detected as being outside & thus triggers a close followed by setting the state to open DateRangerPicker once again in a flicker. Here's the codesandbox for my use case (it's in Next.js 12): https://codesandbox.io/p/sandbox/loving-fast-hvgh84?file=%2Fsrc%2Fpages%2Findex.js%3A7%2C43
1 replies
KPCKevin Powell - Community
Created by raul-barriga on 9/19/2023 in #back-end
core-js postinstall issue when deploying to render.com
Anyone come across a deployment issue on a full stack app on render.com that says it's due to core-js? Here's the log:
Cloning from https://github.com/raulbarriga/MERN-FullStack-Ecommerce...
Sep 18 12:19:46 PM ==> Checking out commit f6fb50c2e8693f041930aa07c2a7afc1ef0311a9 in branch main
Sep 18 12:19:48 PM ==> Downloading cache...
Sep 18 12:19:55 PM ==> Still downloading cache...
Sep 18 12:20:02 PM ==> Using Node version 14.21.3 via /opt/render/project/src/package.json
Sep 18 12:20:02 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Sep 18 12:20:03 PM ==> Running build command 'npm run build'...
Sep 18 12:20:03 PM
Sep 18 12:20:03 PM > [email protected] build /opt/render/project/src
Sep 18 12:20:03 PM > npm install && npm install --prefix frontend && npm run build --prefix frontend
Sep 18 12:20:03 PM
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM > [email protected] postinstall /opt/render/project/src/node_modules/core-js
Sep 18 12:20:13 PM > node -e "try{require('./postinstall')}catch(e){}"
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM > [email protected] install /opt/render/project/src
Sep 18 12:20:13 PM > npm install && cd frontend && npm install
Sep 18 12:20:13 PM
Sep 18 12:20:15 PM
Sep 18 12:20:15 PM > [email protected] install /opt/render/project/src
Sep 18 12:20:15 PM > npm install && cd frontend && npm install
Cloning from https://github.com/raulbarriga/MERN-FullStack-Ecommerce...
Sep 18 12:19:46 PM ==> Checking out commit f6fb50c2e8693f041930aa07c2a7afc1ef0311a9 in branch main
Sep 18 12:19:48 PM ==> Downloading cache...
Sep 18 12:19:55 PM ==> Still downloading cache...
Sep 18 12:20:02 PM ==> Using Node version 14.21.3 via /opt/render/project/src/package.json
Sep 18 12:20:02 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Sep 18 12:20:03 PM ==> Running build command 'npm run build'...
Sep 18 12:20:03 PM
Sep 18 12:20:03 PM > [email protected] build /opt/render/project/src
Sep 18 12:20:03 PM > npm install && npm install --prefix frontend && npm run build --prefix frontend
Sep 18 12:20:03 PM
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM > [email protected] postinstall /opt/render/project/src/node_modules/core-js
Sep 18 12:20:13 PM > node -e "try{require('./postinstall')}catch(e){}"
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM
Sep 18 12:20:13 PM > [email protected] install /opt/render/project/src
Sep 18 12:20:13 PM > npm install && cd frontend && npm install
Sep 18 12:20:13 PM
Sep 18 12:20:15 PM
Sep 18 12:20:15 PM > [email protected] install /opt/render/project/src
Sep 18 12:20:15 PM > npm install && cd frontend && npm install
It creates an infinite loop, repeating npm install && cd frontend && npm install. Notice the issue of [email protected] postinstall /opt/render/project/src/node_modules/core-js and node -e "try{require('./postinstall')}catch(e){}". I've set up my env variables on render.com, made sure my node version is the same as render, checked the root folder and build & start commands, but everything seems okay there. Here's the repo link: https://github.com/raulbarriga/MERN-FullStack-Ecommerce.
1 replies
KPCKevin Powell - Community
Created by raul-barriga on 8/27/2023 in #front-end
pause a css background video
How do I pause or stop a background video while I'm working on it in development mode? I'm using Chrome's devtools & used css to display the video with the 'background' css property.
3 replies
KPCKevin Powell - Community
Created by raul-barriga on 6/30/2023 in #back-end
node.js unit test resources
Any good resources for learning automated testing a rest api with Node.js/Express.js? Preferably, one that you've tried or heard good things about.
2 replies
KPCKevin Powell - Community
Created by raul-barriga on 4/9/2023 in #front-end
stay on same tab after form submit (bootstrap 4.6)
Has anyone had the issue regarding html tabs and a form tag, where when you submit a request from a different tab other than the default first one, as the web page refreshes, you’re sent to the default first tab instead of staying on the tab that sent the form? I’m using bootstrap 4.6
1 replies
KPCKevin Powell - Community
Created by raul-barriga on 2/24/2023 in #back-end
IntelliJ issue
I cloned a project I have to do for a Udacity nanodegree in java using IntelliJ. But for some reason, that project window is not showing any documentation when I hover over things. But if I try to open another project, it will work as expected, showing documentation as you hover over things. So I'm guessing it's this specific project that's giving some issue.
2 replies
KPCKevin Powell - Community
Created by raul-barriga on 10/11/2022 in #back-end
Check if id exists using node-postgres
WIth MongoDB & Mongoose, I could check if an id exists like so:
if (!mongoose.Types.ObjectId.isValid(id))
return res.status(404).send(`No post with id: ${id}`);
if (!mongoose.Types.ObjectId.isValid(id))
return res.status(404).send(`No post with id: ${id}`);
How can I do that using Postgres & Expressjs? I'm using node-postgres for the queries.
3 replies
KPCKevin Powell - Community
Created by raul-barriga on 9/21/2022 in #back-end
Browser not showing images folder from react build
My images folder from React's build folder is not showing in the browser's sources files: http://54.212.156.118/. This is a mern stack project.
8 replies