node.js-connect Questions
2
Solved
There are two session-related middleware packages bundled with Connect/Express.
What is the difference? How do I choose?
I'm assuming that session middleware is the same as cookieSession middleware...
Ingenuous asked 1/4, 2013 at 14:0
2
Solved
Is it better to have a separate function to handle GET and POST requests for the same API endpoint or combine them into one function that discriminates based on the existence of req.body or req.par...
Gourd asked 8/1, 2014 at 17:43
5
Solved
I would like to have a middleware function which modifies the response body.
This is for an express server.
Something like:
function modify(req, res, next){
res.on('send', function(){
r...
Delgadillo asked 27/3, 2012 at 19:48
1
Solved
I'm having a problem using the connect-keycloak middleware with NodeJS, and there appears to be very little documentation online from people who have used it. This is based on 'A Full Example' from...
Oedipus asked 3/12, 2015 at 2:12
4
Solved
I'm building a Node.js app with Connect/Express.js and I want to intercept the res.render(view, option) function to run some code before forwarding it on to the original render function.
app.get('/...
Sordello asked 14/2, 2012 at 23:38
3
Solved
Initially this error message started appearing very infrequently, but started to appear more regularly and now appears 4/5 times I run my application.
I'm handling my session store with Mongo and ...
Seamaid asked 27/3, 2014 at 20:36
2
Solved
when I call this node.js file
var connect = require('connect');
var app = connect();
app.use(connect.static('public'));
app.listen(3000);
I immediately get
app.use(connect.static('public'));
^
Ty...
Champaign asked 20/6, 2014 at 23:18
2
I am newbie to Nodejs. I have an app.js and an index.js inside the route directory. I have an app.use(multer....). I also have app.post('filter-reports') defined which actually uploads the file con...
Conga asked 5/1, 2015 at 9:20
2
Solved
I'm using node with express and passportjs to restrict access to files located in a private folder. I have reduced my code to the following.
Everything in the public static folder works great but r...
Teodora asked 13/7, 2012 at 15:19
4
Solved
I have an API that can be called either using a browser where requests are transactional and have a session OR directly, eg. using curl, where requests are atomic. Browser requests must first authe...
Riotous asked 21/1, 2014 at 17:20
5
Solved
I've written a web-server using Node.js.
When I tried to test my server with the tester I've written for it, I succeed only if the port I'm using for the server is not 80.
I've checked on netstat, ...
Whetstone asked 9/1, 2012 at 17:53
1
I have an Express 3.0 app and I'm trying to use the static(), staticCache(), and compress() middleware to serve and compress my static files. This is my current app.configure() function:
app.conf...
Estellaestelle asked 18/4, 2012 at 21:5
4
Solved
On server side I am using Connect and Socket.IO. I want to serve my client side code (also CofeeScript) to be compiled (to JavaScript), uglyfied and gzipped. I looked for Conenct middleware to do t...
Nambypamby asked 8/9, 2011 at 16:0
1
Solved
I'm reading Node.js Connect version 2.15.0:
/**
* Create a new connect server.
*
* @return {Function}
* @api public
*/
function createServer() {
function app(req, res, next){ app.handle(req...
Affiant asked 13/5, 2014 at 8:48
1
Solved
I've written a session store driver for ArangoDB for ConnectJS. It is working, although still very much in alpha, but I have a couple questions.
First sessions that have an expires attribute of &qu...
Rhotacism asked 7/3, 2014 at 22:38
4
Solved
At times during development, it would be really nice to prevent HTTP 304 responses (in favor of 200's), and cause the Connect/Express static middleware to read every response from the filesystem, r...
Growing asked 1/2, 2013 at 7:2
3
I'm a node.js developer who creates web apps using express.js.
By now, my problem is:
Whenever I create an app on my computer, npm install its stuff and run it (with node app.js and nodemon) I get ...
Almeria asked 25/10, 2013 at 4:33
3
Solved
I would like to achieve something like this:
var c = require('connect');
var app = c();
app.use("/api", function(req, res, next){
console.log("request filter 1");
next();
});
app.use("/api", f...
Octillion asked 4/7, 2012 at 20:46
2
Solved
I'm making a Node.js app and I am using Winston for most of my logging purposes. I also aware of the Connect/Express logger function and know it has a stream option... Is it at all possible to outp...
Cysticercoid asked 4/2, 2012 at 13:52
2
Solved
I am trying to create a simple login using express and angularjs. The angular js app runs on a separate server (grunt server localhost:9000) while the express app runs on another port. For my expre...
Nausea asked 13/8, 2013 at 21:59
1
Solved
I'm trying to prevent favicon.ico form making a second request when a socket connects.
Here is my server:
var io = require('socket.io'),
connect = require('connect');
var app = connect()
.use(c...
Monophonic asked 7/10, 2013 at 12:44
1
Solved
I am trying to write an expressjs server utilizing the postgresql as the backend. Each request starts by calling pg.connect to get a pooled connection (client) as well as the method to return it to...
Bustos asked 13/9, 2013 at 9:56
1
Solved
The following is a simple example of a Node.js/Express web server:
var express = require('express');
var app = express();
app.get('/*', function(req, res){
res.end('Hello, you requested ' + req....
Lemming asked 9/9, 2013 at 17:14
2
I am working on a cunning plan that involves using node.js as a proxy server in front of another service.
In short:
Dispatch incoming request to a static file (if it exists)
Otherwise, dispatch...
Patrolman asked 4/6, 2011 at 1:9
1
Solved
I'm doing a tutorials on node.js, and the lesson is teaching me how to create a server using node. In the code below, what does the connect.bodyParser() line do?
var app = connect()
.use(connect....
Mcalpin asked 11/8, 2013 at 12:8
© 2022 - 2024 — McMap. All rights reserved.