Archives : October-2020

<form method="POST" action="/createchatroom"> <input value={roomName} name="roomname" onChange={(e) => setRoomName(e.target.value)} /> <button type="submit">Create Chatroom</button> </form> app.post("/createchatroom", async (req, res) => { const roomId = uuidv4(); const result = await createChatroom(roomId, req.body.roomname); result ? res.redirect(`/chatroom/${roomId}`) : res.send("failed"); }); <Route path="/chatroom/:roomId"> <Chatroom /> </Route> I want to send a request to backend, and the backend redirects the url ..

Read more

The home page refreshes successfully. But for any other route when I refresh the page goes blank. Example: …/view/5f9ad1c453db51de5e52f94d …/browse/movies/ And here the settings for above: 1- Nginx configuration . . . root /var/www/html/build; location / { try_files $uri $uri/ /index.html; } index index.html; . . . 2- React <Router history={history}> <Nav /> <div className="container ..

Read more

I have an issue with my Electron application, where reloading a local file fails. The Electron app wraps a React web-application that was originally created with create-react-app. The React app is built using react-scripts and the whole build folder (among others) is then packaged using Electron Forge, and then installed using the Squirrel Windows installer. ..

Read more