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

submiting a form

how can i prevent a form from submit .i try it suing the JavaScript but it doesn't work

Receiving an axios.post() request in app.js

This is my axios.post() sending my form's input.value to the server ``` const btn = document.querySelector('.submit-btn') const input = document.querySelector('.form-input') const formAlert = document.querySelector('.form-alert')...

Not seeing app.post() network request reflected in Chrome Network tab

I have a simple axios.post() request to 'api/people' When I submit the form I should be getting a Network response in the dev tools that when I click on it, under Headers, says Request URL: https://localhost:8080/api/people...

ASP.NET MVC Application to React with API's

Hi All, We have an application developed in asp.net MVC with jQuery and calling c# controllers, now part of the modernization I have been assigned to modernize and move to azure cloud my approach is React app calling APIs, is this the right approach??. Thank you all. Suresh Pasham

Understanding a tutorial: Using axios.get()

I'm following a tutorial that uses Express JS to create a server and integrates it with some 'static' resources (html, css, js).. showing how app.get(), app.post() work with a form etc (pic 1 & 2) There are 2 'versions' of the form that the tutorial goes over. One of them, (the index.html), links the form to the server, in app.js, with a method = POST. (pic 3) There, we're using a require() to get a people array out of a local file (data.js), and in our app.post using that info to test against the user's form input. (pic 1)...

What's the best headless CMS for creating a social media platform?

Hi guys, was wondering about my options for a headless CMS to create user profiles and add comments to things. I'd be using React. I know there is no best, but was wondering what my options were and what works for you guys. This would be for freelancing so I need something that's easy to set up but secure and flexible Honestly though, I've never worked with a headless CMS so I'm not sure if that's even the best tool to use. I just want something that's easy to create user profiles and add comments in a production environment pretty much. I'd appreciate any insight you guys have...

NodeJS app.js requiring a JSON file?

I know that if I had some JSON data in a .js file, that I could, at the end of that .js file, do a module.exports() of that JSON module's name, and then require it in my app.js, and use a res.json() on it. (pics 1-3) But what if instead of having that JSON data in a js file, it was housed in its own .json file? I couldn't do a module.exports() from inside a .json file. ...

"absolute path" <-- starts from "root" directory

How far back do we mean when we says an 'absolute' path goes to the 'root' directory? In the context of an ExpressJS app.. Would the "root" be the project folder correct? And if so, how does it know to stop there and consider that the 'root'. Is it looking for some identifying file or something? Like package.json?

Express JS install giving many venerabilities, incl 'critical'

I'm following a tutorial which is about to get into how to use Express JS for setting up a server, and I went to install Express and got back all kinds of venerabilities, including critical. I don't have anything else installed except for 'nodemon' for auto-restarting the server upon save. Does any one know why I'm getting all of these venerabilities?/If/How to address them?...

Vernacular: "API" vs "module"

I'm taking a NodeJS course right now, and it seems the instructor will refer to the "Event Emitter" API" We'd previously created a custom event emitter with
const eventEmitter = require('events');...

Any good course for learning Drupal?

Hey, Can you guys recommend any decent Drupal course for Absolute Beginner Free or paid, ok with both Edit: And PHP 😛...

Resources for technical interview Javascript/NodeJs

Hey everyone! I luckily got an interview for a internship at a company. The position is for a NodeJs developer and I've been told the interview will evaluate my javascript and nodejs knowledge. Is there any resource you'd recommend so I can practice before? I'll gladly appreciate anything you can offer.

PHP - What's going on here?

Hi.. Quite new to LAMPy stuff - I'm trying to pick apart a bit of code here. Can someone explain what's going on? I get what it's doing, I just can't put a name to the functionality to explore it further if that makes sense. `php > unset ($error); php > echo (empty($error)) ? 'The string is empty' : 'The string has something in'; The string is empty...

Why is the zero-indexed item in my $array not recognised?

```<?php $array = ["1", "3", "5", "7", "9"]; $compare = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; ...

I need person know about java

Anyone here knows java? I really need someone to help me build the calculator which the type of calculator is for ratio and proportion computation. Thanks

Conceptual understanding of form submitting to a server-side script.

If I need a form to, upon submit, take in the user inputs, analyze them against a .json file for matches, and then "get"/fetch the correct objects from the .json.. and have those objects populate an HTML template.. Would my server-side language (ex; PHP) be what would analyze the user input and also import the .json objects in order to search through it? And then also be where the templated HTML would be created?...

package.json exports: export file from other module

Is there a way for a package to export a file from another package directly? Something along the lines of; ```json...

Learning java

Hi, i just completed my graduation, but due to covid, i missed my basic concepts like core java, dsa. As a fresher, I want to start my career as a full stack java developer. Can anyone help me with the concepts, resources, what to learn, how much to learn and how to learn? Should i go for online tutorials or learn with the help of books? I really need help as I am alone, i have to do this by myself. Please any tips on how should I study java, dsa, and development all together.