Questions tagged [node.js-connect]

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.

298 questions
0
votes
1 answer

modify connect.static responses

I want the functionality of connect.static, but I want to inject code into any HTML and JavaScript files that are served. Can I hook into connect.static to modify the data it serves? Is there a better approach?
alltom
  • 3,162
  • 4
  • 31
  • 47
0
votes
2 answers

Why is Geddy not built on Connect?

From this presentation http://techwraith.github.com/presentations/2012/nodepdx The author states the following: "Connect also give you problems" "Connect buffers some responses" "Connect has no structure" "Express gives you all the problems Connect…
Olivier Refalo
  • 50,287
  • 22
  • 91
  • 122
0
votes
2 answers

how to use node.js upgrade event socket outside callback?

I am using node.js connect framework to listen to upgrade event. I can use the socket in callback function to write back to client. But how can I use the socket outside callback function to write to same client. In my case there is only one client…
vinayr
  • 11,026
  • 3
  • 46
  • 42
-1
votes
1 answer

experienced issue with expressjs/nodejs after updating connect

I am currently using the following versions of node & express (ubuntu): node: 0.6.12 express: 2.5.8 I believe I am using connect v2.0.3. The error spawns from the http/https.js file inside the express/lib/http.js file (I am referencing http/https…
ali haider
  • 19,175
  • 17
  • 80
  • 149
-1
votes
1 answer

Skip basicAuth for one route

I'm using node, express and connect for a simple app and have basic HTTP auth implemented as follows (lots of code left out for brevity): var express = require('express'), connect = require('connect'); app.configure = function(){ // other…
-1
votes
1 answer

Getting an error Cannot GET /api/course/update/:courseId while I make an api update in nodejs

I am a newbie in nodejs. I just created a CRUD project using Nodejs, Hbs, mongoose and express. While testing the update function on localhost. I am getting the ERROR Cannot GET /api/course/update/:courseId. I tried testing API by POSTMAN before.…
Huu_Tu
  • 11
  • 1
-1
votes
1 answer

how to call Synchronous function in node js

i have created one global function for fetching records from database mysql , but its return undefined but once we pass static data under this function its working fine , methods.trendingPodData = function (){ var sql = "SELECT * from…
-1
votes
2 answers

Can't we use oracle12c instead of mysql in node.js

I have used Oracle 12c instead of mysql. but I am getting "Error: connect ECONNREFUSED 127.0.0.1:3306" how to resolve this bug?
-1
votes
3 answers

Why not print the date?

This is my code, there are 2 files: file b.js module.exports.data = function() { return new Date(); } file a.js var a = require("./b") var http = require('http') http.createServer(function(req, res) { res.writeHead(200,…
Mark
  • 59
  • 10
-1
votes
1 answer

Why connect accept a third parameter,how to pass it in

I read the source code of connectJS,this part confuse me function createServer() { function app(req, res, next){ app.handle(req, res, next); } merge(app, proto); merge(app, EventEmitter.prototype); app.route = '/'; app.stack = []; return…
Guichi
  • 2,150
  • 1
  • 19
  • 27
-2
votes
1 answer

Install connect web server on RHEL linux with nodejs

I have installed nodejs 8.11.3 on RHEL 7.5. Next step is to install the connect web server by running the command from the nodejs installation directory. npm install connect However, my problem I cannot find the nodejs installation directory in RHEL…
-2
votes
1 answer

Node.Js I can't run the server

This is what it supposed to do on Node.Js I am stuck at 6:16 where it said "node server.js" where it supposed to open up 127.0.0.1:3000, but all I get is this error. on my browser it says "ERR_CONNECTION_REFUSED" There is nothing wrong with XAMMP…
-3
votes
1 answer

How to deploy a node.js app to heroku?? It is possible or not?

The problem was with git add.I had forgotten to add the node_modules files.I closed the terminal and ran the set of commands given in the Getting started with Heroku and NodeJs[1] again.The application was successfully pushed onto the stack.
1 2 3
19
20