Connect is a middleware framework for Node.js. It processes or decorates HTTP requests and responses to provide features such as session handling, authentication, asset management or compression.
Questions tagged [node.js-connect]
298 questions
0
votes
2 answers
Connect Middleware Node.js Max File Size
I have an FTP portal built on node.js. When uploading a file over 100MB, i get an error.
Here is the error output:
{"error":{"message":"Request Entity Too Large","stack":"Error: Request Entity Too Large\n
at Object.exports.error…

ss7
- 2,902
- 7
- 41
- 90
0
votes
1 answer
My express application could not connect to mongodb
Hi i connect my mongodb with command prompt on windows. But i could not with express application. I read too many blog post about node,express and mongodb but could not find the problem. So i need advise.
My database folder : c:/data/db
My mongodb…

ftdeveloper
- 1,053
- 3
- 26
- 50
0
votes
1 answer
Node javascript session undefined request or property
I'm having a weird problem with nodejs and sessions.
I have traced the problem down to session.save function,
TypeError: Cannot read property 'sessionStore' of undefined
at Session.save (C:\Program…

Rainer Plumer
- 3,693
- 2
- 24
- 42
0
votes
1 answer
How to override Connect/Express request uri
I wanna override url before app.router parsed.
Insert path like http://example.com/#{uid}/#{trueURI}
should to be http://example.com/#{trueURI}
I use following…

Chia-Yu Pai
- 721
- 1
- 5
- 19
0
votes
2 answers
What is the most common way to use a middleware in node with express and connect
Thinking about the correct way, how to make use of middlewares in a node.js web project using express and connect which is growing up at the moment.
Of course there are middlewares right now wich has to pass or extend requests globally but in a lot…

Bernhard
- 4,855
- 5
- 39
- 70
0
votes
2 answers
Passportjs - req.logout function does not exist
I have a route that looks like so:
exports.logout = function(res, req){
req.logout() // I blow up
res.redirect('/')
}
Error: Object #ServerResponse has no method 'logout'
The Request object does not contain a logout function…

Nick
- 19,198
- 51
- 185
- 312
0
votes
2 answers
How can I style/customize connect/middleware-directory output?
I'm trying to build a simple searching/browsing service for a server and I thought it could be interesting to use Express for that to get familiar with it.
For the problem I'm considering, I have express@3.4.1 and a very simple app.js:
var express =…

Jérémie Parker
- 3,184
- 2
- 20
- 33
0
votes
1 answer
In Node.js, is it normal to create several "server" objects, but only bind one to a port?
I'm just about done reading "Node.js in Action", and I'm trying to put together the pieces of Node.js --> Connect --> Express. I have a question about the "servers" that we create in Node.
node_server = http.createServer();
connect_app =…

loneboat
- 2,845
- 5
- 28
- 40
0
votes
1 answer
"Request module" causing issues while doing the get request, on the middleware that uses "connect" in node
I am using request module at the client side to perform a REST get request where middleware is connect which then routes the request to my node server that serves it. The issue is that i tried to use the option json:true while making a request…

PSL
- 123,204
- 21
- 253
- 243
0
votes
1 answer
npm install errors with Connect module
I have installed all dependencies related with this project https://github.com/msfrisbie/mean-stripdown.git with the command npm install.
Then I got the next errors related only with connect@2.9.0 module:
npm ERR! missing bytes@0.2.1 required by…

sergio
- 619
- 6
- 16
0
votes
1 answer
Routing to different node.js express-apps on one server
I want to run different apps on one server, but the routing between them should be made with paths and not with sub-domains.
I read about bouncy and the connect vhost middleware, but they just allow me to route sub-domains to different ports.
I want…

K..
- 4,044
- 6
- 40
- 85
0
votes
1 answer
Node.js and MongoDB Use results from one query in another
I have created a node.js module that can already query MongoDB for a set of documents using a find and output those results to JSON. My question is, knowing that node.js is asynchronous, how can I use the results from this query (items) to create a…

FarscapePROJ
- 285
- 3
- 16
0
votes
3 answers
Error When Trying to Out Prime Numbers in Node.js
I'm writing a node.js script that writes the first 100 prime numbers to a file, with each prime separated by a comma.
#!/usr/bin/env node
function listPrimes( max ) {
var primes = [];
var sieve = new Array( max );
for( var i = 0; i <…

Darrin Crow
- 43
- 1
- 5
0
votes
1 answer
NodeJS Connect/Express implementation
Does anyone know how to implement the function chain used in connect/express. So one can do this..
var app = {}, app.stack = [];
app.use(function(r, s, n){
// dosomething
})
require('http').createServer(function(r, s){
// execute functions in…

C B
- 12,482
- 5
- 36
- 48
0
votes
1 answer
Connect.js static middleware and coffeescript
I am trying to learn to use the Connect.js static middleware, but all the examples I find use the static command as either a function, or a getter, some use a method called use(), while others don't. Frankly, I'm stumped.
I am doing this in…

tutiplain
- 1,427
- 4
- 19
- 37