node.js-connect Questions
2
Solved
Is it possible to write a middleware which executes after the response is sent to a client or after the request is processed and called just before sending the response to client?
Sinuous asked 20/7, 2013 at 11:34
1
Solved
This question extends that of What is Node.js' Connect, Express and "middleware"?
I'm going the route of learning Javascript -> Node.js -> Connect -> Express -> ... in order t...
Stylish asked 19/7, 2013 at 15:48
3
Solved
I'm trying to use the built in cookieSession object of connect, but I cannot get it to work properly with express.
I have this app:
var express = require('express');
var connect = require('connect'...
Gasparo asked 29/3, 2012 at 12:55
2
Solved
I'm working on an app that uses connect/express with node.js. It uses the "static" middleware like this:
var express = require("express");
var io = require("socket.io"...
Sabir asked 5/2, 2012 at 6:55
3
Solved
I am running node.js as follows:
> http = require('http')
> http.get('http://myhost.local:8080',
function (res) { console.log("RES" + res) }
).on('error', function (e) { console.log("Error...
Macarthur asked 5/3, 2013 at 15:6
2
Solved
I wrote a middleware for Connect and Express that requires some heavy lifting in its setup method. Due to the nature of the initialization tasks this stuff is asynchronous, so I have the problem th...
Horlacher asked 22/3, 2013 at 11:40
1
Solved
Assuming I have middleware such as this;
var express = require('express');
var app = express();
app.use(function (req, res, next) {
var host = "example.com";
if (req.host !== host) {
res.redi...
Numidia asked 22/3, 2013 at 13:38
2
Solved
I'm currently using nodejs with connect as my HTTP server.
Is there anyway to activate HTTPS with connect?
I cannot find any documentation about it.
Unbosom asked 17/3, 2013 at 4:35
1
Solved
I'm playing with a simple Connect file server:
var connect = require('connect'),
http = require('http');
connect()
.use(connect.static('.'))
.listen(3000);
The file index.html loads when I v...
Toffee asked 9/3, 2013 at 10:11
1
Solved
I have an object:
var obj = { "stuff": "stuff" }
In Express, I send it the client like so:
res.json(obj);
Is there a way to configure the response object to automatically add attributes to th...
Henson asked 1/2, 2013 at 22:17
3
Solved
Trying to write some helper methods for an express 3.0 app. Here is an example to greet the user:
app.locals.greet = function(req,res) {
return "hey there " + req.user.name;
}
However, req an...
Durgy asked 14/12, 2012 at 22:3
2
Solved
I have done this before... I don't follow what I'm doing wrong this time, but I've been struggling for a couple of hours and now consider myself mentally blocked. The corresponding code:
app.use(e...
Shanley asked 3/10, 2012 at 18:56
1
With the latest version of connect (as of 2012-07-26), I've found the following way to get a session ID from socket.io that will work with a connect-redis store.
var express = require('express')
,...
Shadowy asked 27/7, 2012 at 3:19
2
Solved
I am relatively new to nodejs etc. Anyway I have a program that I am attempting to write that uses a session/authentication system based on this one here:
http://iamtherockstar.com/blog/2012/02/14/...
Cartwell asked 27/2, 2012 at 10:50
2
Solved
Yes I know connect-assets. But I hope the coffeescript files can be compiled on request. Just like in stylus middleware.
app.use(stylus.middleware(
src: __dirname + "/assets",
dest: __d...
Thousand asked 18/7, 2012 at 20:7
4
My app is Node.js using Express.
Sending this test data from my client using jQuery POST:
{
title: 'hello',
notes: [
{title: 'note 1'},
{title: 'note 2'}
]
}
And this is the result in my serv...
Caylacaylor asked 8/5, 2011 at 13:34
2
Solved
I'm learning express.js / node.js and have a good but not excellent understanding of the javascript prototype model. Hence, I'm a bit confused on the way middleware can be stacked in express.js's r...
Soap asked 30/6, 2012 at 7:51
1
Solved
I would like to know what are the functions that the Error object of nodejs express exposes for use in error handling?
A console.log of an error call new Error('NotFound') is showing only [Error: N...
Cauchy asked 16/5, 2012 at 18:56
1
Solved
I have a nodejs express 2.0 application and I want to use express 3.0 within it. Tell me please which is state of express 3.0 at now and is there examples of express 3.0 applications?
I saw connec...
Heliochrome asked 18/4, 2012 at 6:33
2
I have been trying but I have found out that iOS 5 by default doesn't accept cookies. I have been trying many different things even using Redis but still cannot get a session to persist for more th...
Lumberman asked 17/2, 2012 at 4:30
2
I'm using a Node.js server and I'm developing with the Connect framework. I'm trying to regenerate SIDs after a given interval to avoid session fixation. There's a method called req.session.regener...
Border asked 10/3, 2011 at 20:15
3
Solved
With Express / Connect I can set up an middleware function in either of the formats:
function(req, res, next) // first argument will be a request
Or
function(err, req, res, next) // first argument...
Acclimate asked 8/12, 2011 at 12:45
2
Solved
I have the following in my node server using Express (truncated to the important parts):
var app = express.createServer();
app.all(/test/,function(req,res){
console.log(req.headers);
console.log...
Debunk asked 17/9, 2011 at 1:58
2
Solved
My app.coffee looks like this:
connect = require 'connect'
express = require 'express'
jade = require 'jade'
stylus = require 'stylus'
app = express.createServer()
# CONFIGURATION
app.configure...
Kurtis asked 13/6, 2011 at 18:11
3
Solved
I'm using Node Boilerplate and it all worked fine until I decided create another project on top of it (in another dir).
Now I have exactly the same code base (this project AS IS) in two different f...
Zinkenite asked 13/3, 2011 at 17:20
© 2022 - 2024 — McMap. All rights reserved.