Questions tagged [express-4]

Express is a minimalist web framework for Node.js which provides a set of features for web and mobile applications.

Express is a minimalist web framework for Node.js which provides a set of features for web and mobile applications.

Helpful links

105 questions
0
votes
1 answer

Database does not update user password reset

I'm creating a password reset functionality and my database doesn't seem to update the users password, when submitting the new password form I get a 404. Here is my post route for the form // Token URL :post router.post('/users/reset/:token', (req,…
user8331511
0
votes
1 answer

RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: [object Object] error express 4.16

I'm implementing a password reset and when clicking on the generated link I'm getting the following error, Thu Jan 25 2018 16:54:38 GMT+0000 (GMT): GET /users/reset/d590c54753abc449cfcd8aefceb8d519fce4b627 express deprecated res.redirect(url,…
user8331511
0
votes
2 answers

Express Nodemon and reload not reloading the browser

I did a fresh install of express app. And my package.json { "name": "projects", "version": "0.0.0", "private": true, "scripts": { "start": "nodemon ./app.js" }, "dependencies": { "body-parser": "~1.18.2", "cookie-parser":…
Alaksandar Jesus Gene
  • 6,523
  • 12
  • 52
  • 83
0
votes
1 answer

Nodejs Express 4 file upload not working

I am using Angular in the front and Nodejs + Express 4 at backend. When I'm trying to upload a file using simple html form, the request contains: Content-Type: image/jpeg whereas plugings like busboy, connect-busboy etc. require Content-Type to be…
Ashutosh
  • 4,371
  • 10
  • 59
  • 105
0
votes
1 answer

How to read hash params and query params through url in express 4

I have a scenario where I need to read tokens from URL which are appended after a hash. I am using express 4. Eg URL: http://localhost:3000/callback#access_token=1234-5678-90AB&token_type=bearer&expires_in=100 Can anybody help me to extract the…
Ashish Santikari
  • 443
  • 4
  • 19
0
votes
1 answer

require a module from within another module errors

I am an amateur nodejs developer. I am having deep problems with javascript modules and requiring modules from inside other modules. Here is the scenario I need help with. Lets say I have API definitions in one file like so (userApi): var…
user2355058
0
votes
1 answer

Bundling Middleware

Background I'm writing a web application using Node/Express 4 on the server. Some of my routes need to be open to the public, but other routes need to be secured using token authentication. The process of performing the token authentication…
Luke
  • 5,567
  • 4
  • 37
  • 66
0
votes
1 answer

REST with mongo, node and express 4 on openshift. Not responding

I have set up the beginning of a REST API with Node, Express 4 and MongoDB on Openshift. I have tried different configs and setups without making it work. Now my main server.js looks like this: var AppContainer = function () { // Scope. var…
Johan Wiström
  • 373
  • 1
  • 5
  • 13
0
votes
0 answers

Node, Express 4.... getting error "not a function"

I’m very new to node.js and I have a problem accessing data from a JS file. I have 3 files (see below) I'm storing data in “SeondController” that I want to retrieve from “FirstController”. I can reach “FirstController” just fine from “index.js”,…
user3783935
  • 51
  • 1
  • 4
0
votes
2 answers

Node js + Express 4 parsing JSON POST request

Having a problem with something that should be relatively simple. I am sending a POST request with JSON DATA as follows : curl -H "Content-Type : application/json" -X POST -d '{"searchbar":"cat"}' http://someurl.com/public/search Within my…
avrono
  • 1,648
  • 3
  • 19
  • 40
0
votes
1 answer

Express app use after DB callback

I'm using mysql-orm in a Nodejs Express app this is my code: app.js: // ... all variables are initialized var orm = null; var app = express(); db.create(dbSchema, dbSeeds, dbOptions, function(err, ormObject) { if (err) throw err; orm =…
Burawi
  • 451
  • 4
  • 16
0
votes
2 answers

socket.io is not found with Express 4?

I have been trying to get my client connected with my server,but chrome always print that GET http://localhost:30653/socket.io/socket.io.js 404 (Not Found) I don't know where's the problem... the express version is "4.13.4" and socket.io version…
Evercx
  • 3
  • 1
  • 3
0
votes
1 answer

Visual studio 2015 - node.js, express 4 using typescript project does not compile

There does not exist a project template that uses Typescript with Express4, there does however exist typescript template using express3. Is it that TS is incompatible with Express4. I tried by creating regular TS with Express3 template, uninstalled…
Arvind Singh
  • 733
  • 1
  • 10
  • 31
0
votes
1 answer

Node.js Express 4 Generator with Mutliple Socket.io files

I broke my app into modules to add to it in the future. I'm using express 4 with the generator and running into issues with adding my multiple socket.io listeners. In /bin/www app.io.attach(server); In app.js var app = express(); //call…
user2650875
  • 165
  • 1
  • 1
  • 6
0
votes
1 answer

Express is listening on port 3000 despite setting it to 80?

Running on Amazon EC2. The code was created automatically by express-generator. To start the app I had to do this: sudo PORT=80 npm start Then I added lines 14: app.set('port', process.env.PORT || 80); And…
Vegan Sv
  • 335
  • 2
  • 4
  • 17