394 questions
0
votes
1
answer
43
views
Connecting Back-end to Front-end
import React from "react";
import client from "../../apis/client";
export default function SignUp() {
const handleSignup = async (event) => {
event.preventDefault();
...
1
vote
1
answer
1k
views
Request from the application inside the client container to the server container is not working
I have a React application and a server with a database. In the application, I make a request like fetch('http://serverstrapi:1337/api/auth/local/register/') or fetch('http://serverstrapi/api/auth/...
0
votes
1
answer
798
views
TypeError: db.collection is not a function when using Firestore in a React component [duplicate]
I am encountering an error while trying to use Firestore in my React component. The specific error message is "Unhandled Runtime Error: TypeError: ...
0
votes
1
answer
124
views
MERN stack axios issue status 404 with server running fine
I'm having trouble sending a data from a form to my database using axios in my MERN stack app. The server seems to work fine as I can make the POST request using Postman, however when I try to submit ...
3
votes
1
answer
751
views
How can I post to my WhatsApp status using JavaScript?
I'm looking for a way to programmatically post things to my WhatsApp status using JavaScript. I want to automate the process and make it easier to share updates with my contacts. Are there any APIs or ...
2
votes
0
answers
235
views
Does Google Cloud App Engine support websocket applications?
I deployed my backend server on google cloud engine and it generated an https. I am unable to use this with Websocket javascript library at frontend (react) and generates the following error:
...
1
vote
0
answers
187
views
How to upload some images from back express/node and render in front with React
I'm working on a full-stack project using React, Express, and Node.
I have created a JSON file on the backend with some information such as name, description, and pictures. Here's an example:
id: 1
...
1
vote
1
answer
989
views
npm error "cb.apply is not a function" while installing the React.js in my Visual Studio code editor
I am using node.js (version 16) in my Visual Studio code editor, but while installing the react.js I am getting an error:
C:\somedir\> npx create-react-app test
...
npm ERR! cb.apply is not a ...
0
votes
1
answer
49
views
I cannot submit a new Employee succesfully in React form
I am new in the full stack develoment. I have a full stack project with Java Spring boot for the backend and React Typescript for the backend.I have created two entities, Company and Employee.
The ...
0
votes
0
answers
82
views
I have a query and I want to execute this query using lambda invocation?
I have a task where I have to fetch the details from mysql and have to log the data in xlsx file but the problem is I have more than 140 columns in mysql table and also more than 150000 records on an ...
0
votes
0
answers
325
views
Deploy MERN Full Stack application on Heroku
I'm trying to setup an e-commerce store using MERN and currently have a Node backend that connects to a MongoDB database and serves some endpoints to return some results in JSON form. I then ...
0
votes
0
answers
405
views
await User.findOne({email}); returns fail
I am trying to create a login authentication for my form. I have created the user with a hashed password using bcrypt, I am trying to log in but it keeps returning failed. The email and password are ...
0
votes
1
answer
169
views
How to stick div Banner ("50% off of our products") to Navbar which is right above it?
BOOSTRAP:
How to stick div Banner ("50% off of our products") to Navbar which is right above it ?
So structure is following:
<NavBar>
</NavBar>
<div>
<span>...
0
votes
2
answers
201
views
How to send stdin and receive stdout from a python file when using React?
So I'm working on a little board game project in React, using TypeScript. I also want to create an engine that gives an evaluation for the current board state (i.e. Player 1 wins in 2 moves), but I ...
0
votes
1
answer
34
views
Showing already upvoted for the newly created user
This is blog full stack website. Only registered users can upvote and comment. When user is registered he should be able to upvote. But when I run the app and create new user, the button always says ...
1
vote
2
answers
3k
views
React Toast When navigate
try{
const user = await createUserWithEmailAndPassword(auth, email, password)
console.log(user);
navigate('/login');
toast.success('Registered Successfully');
}...
0
votes
1
answer
90
views
Uncaught TypeError: Cannot read properties of undefined (reading 'params') at StudentDetails
So i'm having a problem where i want to pass the created student application from my server-side to my client-side and whenever I create the new student i want to retrieve his/her info on my ...
-1
votes
1
answer
445
views
fast refresh in next js causing fetch error when it's use with express js
I'm tryin to fetch data from my api but fast refresh causing error when I try to know why I found that next js has a bug req.params work only for once because fast refresh feature in next js do you ...
2
votes
3
answers
3k
views
Next.js server automatically ends after a few seconds of running "npm run dev"
i am running next.js for the first time, copied the installation script form the official page
npx create-next-app@latest hello-word
but after installation and running "npm run dev " or &...
2
votes
1
answer
2k
views
Hooking in Node.js and npm to a Spring Boot web app
I'm new to this topic and stuck for two days so I would really appreciate your help.
I'm trying to connect my Spring Boot to React. But I don't have package.json created anywhere just a node folder.
...
0
votes
1
answer
110
views
UseEffect() doesn't fetch my data from the api
I'm following a tutorial on a fullstack app. I'm trying to fetch my data from the API using useEffect(). I've followed the tutorial by heart and I'm stuck on this problem for some time and can't seem ...
1
vote
1
answer
47
views
How to send Post Request from axios, can I right
axios.post(url, { data : obj})
I attend a interview and interviewer say question post from axios
0
votes
2
answers
61
views
How to handle a change in different text input fields of the same form using React.js
I have a form containing two fields of input; name and mark
I want to update a property depending on which field is changing, instead of making two (will be increasing) functions to handle each field ...
0
votes
0
answers
23
views
I am getting oci usage data using the SDK and storing in MongoDB
I am getting OCI usage data with the help of sdk and storing the MongoDB getting this issue please find this issue
Error while storing data in MongoDB: documents must be a non-empty list
How can I ...
0
votes
1
answer
1k
views
Unable to import auth from firebase
I am getting the following error while trying to import auth from firebase.js
Module not found: Error: You attempted to import /firebase/auth which falls outside of the project src/
directory. ...
0
votes
1
answer
2k
views
How to implement functions in module type syntax in NestJS
I'm new with NestJS so I'm having a hard time understanding the basics of putting together a proper application structure. I understand that everything in Nest is built on a modular system. But I do ...
1
vote
0
answers
2k
views
How to connect AWS Cloud9 environment to VS Code?
I want to connect my AWS Cloud9 environment to my VS Code i.e. I will write my code in VS Code and it will show changes in my environment.
Is this possible? If it is, please share how to do it - I ...
2
votes
1
answer
2k
views
How does Vite compile JSX in development?
I'm new to backend. I want to make a server serves up a React app, without using Vite (or CRA). On front-end I'm using React, on back-end I'm using nodemon + express.
I'm confused about how JSX got ...
1
vote
1
answer
130
views
How to upload an image file(jpg, png, etc... and store it in MongoDB?
Whenever I have to upload an image I Upload it on imgbb and then paste the link as text.
Thanks in Advance.
I need a proper way to upload an image and pro tips for handling files like images, pdf, ...
1
vote
1
answer
72
views
Is it possible to serve React from Node?
I'm new to back-end coding, and I'm struggling to understand exactly what a "fullstack" app would look like.
Is it:
A Node-Express server that serves index.html, which has <script src=&...
1
vote
0
answers
959
views
How should I go about hosting/deploying my frontend and backend? Separately or together?
I recently wanted to make a simple website using strapi as the backend cms and react for frontend. Now, every tutorial I watched on this ended like this:
- Backend in one directory
- Has a git ...
1
vote
0
answers
439
views
node/express+React, stream multiple videos from folder on one page
Personal Introduction:
Hi, to everyone im new to backend technology so I premtively give my apologises for being imprecise or for using bad terminology.
Brief Description of my small project
So, the ...
0
votes
0
answers
74
views
fetched data is not rendered by react
My super-simple application fails to fetch and display data.
help me to solve the problem , please, I'm stuck.
my api seems to be basically working, but it fails somewhere on the way to client.
hope, ...
0
votes
1
answer
735
views
How to use same token until expires?
In the code below, I will call LoginAPI for authorization and writes token as a state(Login.e2e.ts ).By the way using axios interceptors.request in my axios.ts file.
My question is;
If I use below ...
1
vote
2
answers
3k
views
How does frontend apps hide backend API call URL's?
I'm fairly new to the webdev. I have a React frontend built with Vite, and a Node.js backend that uses MongoDB. I finished my little project and when It came to deploy it to my Linux server, I got ...
0
votes
0
answers
222
views
Formik min date max date validation if Max date < min date i wanna to showing error
I have 2 input,from date to date and if user enter from date and to date while,to date don't < from date if happened i wanna to shwo error. I'm using FORMIK and YUP package
While I'm tried many ...
0
votes
2
answers
65
views
Why is my function not dispatching in react component?
why is fetchReviews not fetching?
Originally didn't use fetchData in use effect.
Ive tried using useDispatch.
BusinessId is being passed into the star component.
no errors in console.
please let me ...
1
vote
1
answer
34
views
Trying to render 2 methods on useEffect but getting only one's Result
I am trying to render 2 methods on useEffect but the problem is they both get rendered but somehow the method which gets rendered at 2nd place replaces the content of first method
In short: I am only ...
2
votes
1
answer
44
views
how locate elements inside form next to each other
I'm trying to move the name, email and phone fields in the following image next to the message and button:
However, I can't get it fixed.
.full_form {
display: block;
}
.form_contact {
...
0
votes
2
answers
2k
views
Axios POST Request Gives 400 (Bad Request) Error on React
When I use the postman backend it works fine. But when using React and trying to add data to the database gives a 400 error.
When I use the console.log(newpost) it gives a new post object on the ...
0
votes
1
answer
2k
views
"options.allowedHosts[0] should be a non-empty string." when using PROXY with REACT and Django as backend in LOCALHOST
im facing error while im trying to use proxy in package.json on react app and connect to django backend api in local host but when i tried to npm start i get this error:
Invalid options object. Dev ...
0
votes
0
answers
18
views
ReactJS app works fine running with "npm start" but when i build the the app using "npm run build" it doesn't link with backend [duplicate]
error log
This error has been showing in my console from chrome.
Also note that i am using axios to fetch data from backend
.
I used "proxy": "http://localhost:8800/api" in my ...
0
votes
1
answer
361
views
Confusing when publish my React Native Application to google play
After android application expo building done and got APK/BUNDLE file ready to publish and access to google console and begin to fill all the forms stages one by one but when i got finish i face the ...
3
votes
1
answer
7k
views
Vite creating its own node_modules in workspace instead of using monorepo
I have a monorepo for a fullstack webapp with the following directory structure
.
├── client
│ ├── index.html
│ ├── package.json
│ ├── src
│ └── vite.config.ts
├── node_modules
├── package-...
1
vote
0
answers
60
views
Using React as a frontend and node+express as a backend -- on Button click fetch data from SQL and display in a react Grid
In my React application , I wanted search any random ID in text box and than
click Search button , if that id is present in table so i wanted to fetch the respective record's from table and display ...
0
votes
0
answers
68
views
Fetch POST puts payload into the name of the object
Hey i'm try to pass data from my browser, which uses React, to my API - which then manages the database. I can only get the API and database to work via Postman because when i Fetch POST the payload, ...
0
votes
0
answers
1k
views
Problem with useInfiniteQuery - React Query
I have a problem with useInfiniteQuery. This is my code:
const { data, hasNextPage, fetchNextPage, isFetching, isLoading } =
useInfiniteQuery(
"explorePosts",
({ pageParam = 1 }) =&...
0
votes
0
answers
130
views
How should I create Mongoose Schema for Form Checkboxes in React?
I am creating a Form in React, using MUI and react-hooks-form and I cannot seem to make a successful POST request to my endpoint because something between what I am sending through my form and what ...
2
votes
0
answers
2k
views
How to deploy a website to vercel with external backend server?
hey i have a project with a client folder and a server folder.
in the client folder im using next.js.
in the server folder im using node.js.
now i know i can build my backend with next.js api,
but i ...
0
votes
0
answers
14
views
Setting parameters in LINK reactjs
I would like to pass information through the Link tag to another component . However , i am unable to after watching several tutorials .
function Productscard(props) {
return (
<div className=&...