Questions tagged [express]

Express.js is a minimal and flexible Node.js web application framework providing a robust set of features for building web applications.

-1
votes
0answers
9 views

Fetch restful api

What is the syntax to fetch API with Nodejs im trying fetch but it says fetch is not definedenter image description here
0
votes
0answers
6 views

filtering mongodb documents with populating

I'd like to make query to list all operations based on:- peer full name peer type whether it is credit or debt peer value [number greater than or lesser than or range] and also most important based ...
0
votes
1answer
14 views

Configure Nginx to serve Static files of Angular and also reverse proxy for express

i'm very new to Nginx and want to use it for serving static angular files and also proxy to a backend express server. I'm also dockerizing the frontend (with nginx) and the backend. In the frontend i ...
2
votes
0answers
6 views

passport-local-sequelize vulnerability issue

I am trying to install passport-local-sequelize but when I run the command to install it I get this: npm install passport-local-sequelize up to date, audited 137 packages in 2s 5 packages are ...
0
votes
0answers
6 views

Express.js session id isn't set in the browser if I fetch from server

The Problem is that I make a GET request in my browser (client side http://127.0.0.1:5501/), the response headers include a value for set-cookie but the cookie isn't set on my page. If I am visiting ...
0
votes
0answers
12 views

Store application settings which are subject to change

I would like to store some settings (variables) in my nodejs application which should be accessible from the whole application and persisted on restarts of my application. An admin in my application ...
0
votes
0answers
13 views

BadRequestError: checks.state argument is missing - What changed?

Tabled a development project back in November and picked it back up. The authorization that was working is not working any longer and gives me the following error. BadRequestError: checks.state ...
-1
votes
0answers
9 views

How do I redirect from / to /users/profile

const express = require('express'); const router = express.Router(); const {home } = require('../controllers/home_controllers'); //home router.route('/').get(home); router.use('/users', require('./...
0
votes
0answers
16 views

Controller-Service-Repository

I have been asked in my new company to learn about Controller-Service-Repository pattern. I'm working on a simple express API, and I have no idea about this pattern or how to apply it to my code, I ...
0
votes
1answer
20 views

How can I retrieve data from mysql upon clicking on a button by react-native

I'm currently having an error on my code on retrieving MySQL data upon clicking a button. Here is my 'route.js'. const express = require('express'); const bodyParser = require('body-parser'); ...
0
votes
4answers
34 views

How can I loop through the keys of an object and set values equal to a destructured variable?

I am trying to simplify and shorten my current code. My code is working fine. This is what I have: app.patch('/listings/:id', (req, res) => { const { id } = req.params; console.log(req.body)...
0
votes
0answers
10 views

Trying to make React interact with my discordjs bot (with express.js as an api server) and i want to make it more secure

as the title say, I have a discord bot that I want to interact with from a react website. From what I know, one of the ways doing that is by making an express.js server on the same process of the ...
1
vote
1answer
19 views

how to Calculate sum of multiple durations moment-js?

I am tryng to calculate w total working hours of each user what I did is getting the duration of each day, now I want to calculate the total working hours Given this input durations:[ '0:30:00', '0:30:...
-1
votes
0answers
19 views

Integrating socket.io with express is it a good idea? and if so how to go about it?

I'm must say I'm very new to back end development, I'm currently working on an exercise project of making a fake money poker website. I use Node.js socket.io/express-session/passport At first, I ...
0
votes
0answers
16 views

Sequelize throwing "Invalid value { searchTerm: 'Kaizer fc', sportType: '2' }" on Postman

Im trying to create a sequalized query that Searches For a Team Name & Filter To Sport Type but when I test the JSON body on Postman I get an error and its not returning the data. The JSON body ...

15 30 50 per page
1
2 3 4 5
5530