Category "express"

After jwt verification the state change is not presisting

So on the front end I'm using this function to have the user Log In if they have a This Function only works at the time of log in and after if the users just na

Routing in a lambda function without API Gateway

I have an express app and is deployed via serverless. My stack is just a lambda function + API Gateway. That works and it's accessible on Postman or httpxmlrequ

Aws documentdb MongoServerError: Authorization failure while connecting using mongoose

error: [nodemon] starting `node server.js` app listening on port: 5600 /home/ubuntu/cnox-webbackend/node_modules/mongodb/lib/cmap/connection.js:203

How to redirect to new page with Authorization Headers after login?

I have a login page. On click of login button, the details are sent to server and are validated. A token is received in return after successful validation. I ne

Return many files with json from backend to client

I want to know may i respond to client from backend controller with many files (with application/octet-stream). It will be more better, if i respond array of fi

MY SQL Sequelize Unique Value not working as intended

I am trying to code a website to work with ReactJS, NodeJs and MySQL. I have been using Sequelize and it works but i realised that it allows all usernames even

What should the response status code be in a REST API when the given ID is a valid ID but there's no matching document?

I'm using MongoDB for my Express app and I know that when an ID is an invalid ID for the corresponding database, the response status code is 400 (Bad Request).

Node.JS Video Upload

Can anyone help me with video upload in Node.JS? Currently, I am using the express-fileupload module for uploading a video it works fine till 70MB but when the

How to get query result from postgraphile running as a library

I have postgraphile running as as express middleware. For example: const pgMiddleware = postgraphile(pool, SCHEMA, postgraphileConfig); app.use(pgMiddleware);

Manually destroy specific express session from connect-mongo

is there any possible method for me to delete specific session from mongoDB? My scenario is to allow 'myself' to delete specific session from DB (other user ses

Postgresql req.query returning everything instead of what is being queried?

My getByTitle query doesnt seem to work, all my other routes and models work perfectly using params. Not sure what it is I've written wrong? For context this is

TypeError: require(...) is not a function while Using sequalize with node js

I am beginner in web dev and trying to create a Full stack project using Mysql Express React Node js. Facing this TypeError issue while using Sequalize with nod

how to I get a user's IP address when separate client and server apps, in Node with Nest.js

I have two apps, one front end (react.js) and one a REST API back-end(nest.js based on express.js). How do I get the IP address of the user accessing the back-e

how to convert the following syntax into an es6 syntax?

I have this statement to modularize my express.js api's: app.use("/api/users", require("./routes/api/users")); How to write it using import statement? inside "

TypeError: Cannot read property 'then' of undefined , TypeError: _cb is not a function

my code in github, but I didn't upload the latest version: https://github.com/godzillalogan/markdownblog I use node.js and express.js framework. Database use mo

Access res.locals in Multer.diskStorage->filename

I'm working on a login, where the use consists of userImage, userName, userStatus (all send as form-data). To upload the userImage im using Multer. This is how

TypeORM + FoalTS Multiple Database Connections

For some context, I'm building an NodeJS app with FoalTS which uses Express and TypeORM underneath. My question is around how to implement multiple database con

CSS won't load in hbs file for some reason

so I have a very basic file structure going but for whatever reason I cannot get the css to show up in the project when I run it on the localhost. everything el

node.js express req.body undefined

var express = require('express'); var app = express(); var PORT = 3000; const bodyParser = require('body-parser') app.use(bodyParser.json()) app.use(bodyPar

Getting no overload matches this call running mongoose with typescript and express

I am getting the below error for useNewUrlParser, useUnifiedTopology, useCreateIndex: No overload matches this call. Overload 1 of 3, '(uri: string, callback: