Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications. NOTE: Please read the Tag-Wiki before asking questions.

Filter by
Sorted by
Tagged with
132 votes
20 answers
148k views

How do you install Node.JS on CentOS?

I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js ...
qodeninja's user avatar
  • 2,763
54 votes
12 answers
190k views

Docker COPY issue - "no such file or directory"

In my Dockerfile I have the following 'COPY" statement: # Copy app code COPY /srv/visitor /srv/visitor It should go without saying that in my host system, under the "/srv/visitor" directory, there ...
dlyk1988's user avatar
  • 1,674
46 votes
2 answers
26k views

How to use node.js as a production web server?

I'm currently developing a project using node, and as I'm approaching the launch, I'm struggling to find resources on how to setup node for use on a commercial, production server. Most resources I ...
naivedeveloper's user avatar
27 votes
7 answers
200k views

how to stop node.js server

I run the node server by typing node server.js from a putty terminal to get it running. Now i want to stop the server how should i do it? I tried pressing the pause break button on the keyboard. But ...
Rahul Mehta's user avatar
  • 1,009
25 votes
4 answers
47k views

map directive is not allowed here

I am following this tutorial https://medium.com/startup-founder-panel/deploying-a-meteor-app-with-nginx-from-scratch-1332b32e99a5 When I do sudo nginx -t I get nginx: [emerg] "map" directive is not ...
Hayk Safaryan's user avatar
24 votes
1 answer
34k views

Hostname to Localhost with Port - OSX [closed]

I am trying to run multiple Node.js web servers locally on my machine. Because the code I'm writing needs to reference a domain name I'd like to keep a convention of dev.myHost.com and point that to ...
mondo's user avatar
  • 383
22 votes
3 answers
98k views

Node.js is not accessible from external IPs on Ubuntu

I'm sure this is very noobish, so forgive me. I'm trying to run a node.js server on port 8080 of my ubuntu 10.04. Here's the result of iptables -L on the server: Chain INPUT (policy ACCEPT) target ...
Mikael Gramont's user avatar
20 votes
1 answer
55k views

The following packages have unmet dependencies: nodejs : Conflicts: npm

I followed this gist https://gist.github.com/Goddard/5500157 to install nodejs and npm, but after running it neither node --version or npm --version could be ran, giving an error of command not found. ...
lumberjacked's user avatar
20 votes
4 answers
38k views

How do I configure Nginx proxy_pass Node.js HTTP server via UNIX socket?

I am trying to configure a Nginx server to connect to a Node.js HTTP server via a UNIX domain socket. The Nginx configuration file: server { listen 80; location / { proxy_pass http://unix:/...
pvorb's user avatar
  • 1,060
19 votes
3 answers
9k views

Run multiple servers on the same port

I would like to run a XAMPP server, and a Nodejs server on the port 80. If the server get a HTTP request, then XAMPP will handle it, if the server get a Websocket request, then Nodejs How is it ...
iter-ator's user avatar
  • 211
19 votes
4 answers
36k views

Starting a forever process in a Jenkins build step?

I'm running a shell command at the end of a Jenkins deployment to restart a forever script: npm install && forever stop app.js && forever start -a -l /var/log/forever.log app.js When ...
Patrick's user avatar
  • 361
19 votes
2 answers
63k views

nginx: connect() failed (111: Connection refused) while connecting to upstream

I keep seeing the below error message's in the error log, I can access all of the resources but I'm unsure as to why the error is flagging. error: [error] 13368#0: *449 connect() failed (111: ...
Tam2's user avatar
  • 293
18 votes
6 answers
1k views

Any ideas on how to run maintenance on a site that is always under use?

I help out with a large gaming site in Australia. We run competitions from 7am local time to 1am the next day, every day of the week. We haven't skipped a day since the site was released. Naturally, ...
cheese5505's user avatar
18 votes
1 answer
22k views

Where is the private key after using certreq for CSR generation on Windows 10?

I tried to follow the website below for instructions on how to generate the CSR for my web server: http://www.entrust.net/knowledge-base/technote.cfm?tn=8649 However, it only generates the CSR. ...
Chong Lip Phang's user avatar
17 votes
1 answer
46k views

Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with ...
Twipped's user avatar
  • 643
16 votes
4 answers
14k views

Allowing node.js applications to run on port 80

I'm following a walkthrough that guides you through setting up node on an ubuntu machine. I'm at the step where you configure the system to allow node to run on port 80. It (as well as a few other ...
ThinkingInBits's user avatar
14 votes
1 answer
43k views

How to configure nginx so it works with Express?

I'm trying to configure nginx so it proxy_pass requests to my node apps. Question on StackOverflow got many upvotes: https://stackoverflow.com/questions/5009324/node-js-nginx-and-now and I'm using ...
Mars Robertson's user avatar
13 votes
1 answer
12k views

Different fields for proxy_set_header in nginx configuration

I am very new to nginx configuration. I want to use it set virtual hosts so that I can run different Node JS apps on different ports on the same server, but have them served at different subdomains. ...
user191017's user avatar
13 votes
3 answers
20k views

Criteria for choosing a server to run Node.js

What criteria would I use to choose a server to run Node.js? It seems like shared-hosting is a nonstarter since it's so new. Given how it works, what would I be looking at in terms of a production ...
artlung's user avatar
  • 268
12 votes
5 answers
9k views

Is anyone using Node.js as an actual web server? [closed]

I am trying to convince myself to pick it up and start developing with it, but I want to know if anyone has expected stability issues or anything of the sort. I understand it isn't "production" ...
Jeremy Boyd's user avatar
12 votes
3 answers
8k views

node.js, mongodb, redis, on ubuntu performance degradation in production, RAM is free, CPU 100%

As the question title suggests, I'm having an hard time to figure out what can be improved on my application(or tuned in the os, ubuntu) to achieve an acceptable performance. But first I'll explain ...
Franjanko's user avatar
  • 276
12 votes
3 answers
9k views

Chef bash resource not executing as specified user

I'm writing a Chef cookbook to install Hubot. In the recipe, I do the following: bash "install hubot" do user hubot_user group hubot_group cwd install_dir code <<-EOH wget https://...
Arthur Maltson's user avatar
12 votes
2 answers
18k views

Akward delay to connect Apache's proxy request to a node.js App

In my Ubuntu Server 10.04 I'm running an example node.js app: var http = require("http"); function onRequest(request, response) { console.log("Request received."); response....
Herman Junge's user avatar
11 votes
2 answers
12k views

docker-compose for nginx and nodejs server

I have the following docker-compose.yml file: version: '3' services: server: build: context: ../../ dockerfile: ./packages/website/Dockerfile command: node ...
dagda1's user avatar
  • 247
10 votes
3 answers
12k views

/var/lib/nginx/client_body/0000000011 failed (13: Permission denied) with node.js

I'm using node.js with Nginx as web server running on Slackware 14.1. I created a page that uploads a file. In my development machine (Debian like) it works fine, but in production (Slackware ...
BrTkCa's user avatar
  • 203
10 votes
3 answers
18k views

Nginx proxy_pass response truncated

I use nginx to proxy https request to my application server (currently running on 8443). This app server serves dynamic pages, some of them including jquery minified. The pages are in error as it ...
Luc's user avatar
  • 518
10 votes
3 answers
17k views

Appengine stuck on "Updating service [default]..."

I am using nodejs on appengine. We had a perfectly stable app scaffold on tuesday, and by friday it was completely broken after attempting to deploy. We made some minor changes to frontend code, but ...
posit labs's user avatar
9 votes
8 answers
66k views

Centos 7 Can't yum install npm

I'm trying to get nodejs and npm installed on centos 7 So first I did rpm -i http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm to get the epel repository Then I ...
Chris's user avatar
  • 91
8 votes
4 answers
163k views

How do I check how many HTTP connections are open currently? [closed]

I want to know how many people are connected to my server. Since I'm doing comet applications, this is important
Alex's user avatar
  • 8,521
8 votes
2 answers
20k views

Nodejs Nginx error: (13: Permission denied) while connecting to upstream

I'm trying to run multiple Nodejs applications on Nginx server running on CentOS 7. I noticed that when I run a Nodejs app on some ports I get an 502 Bad Gateway error in the browser so I checked the ...
user1's user avatar
  • 181
8 votes
2 answers
9k views

How do I run a shell script from puppet?

I need to install npm which is done by curl http://npmjs.org/install.sh | sh and being new to using puppet, I am a bit confused on how this should be done. I am well aware of creating a package {} ...
Industrial's user avatar
  • 1,599
8 votes
3 answers
24k views

Dynamic port forwarding based on hostname or originating ip

I'm a programmer trying to figure out some stuff beyond my domain: Say I have one machine and clients will make tcp (but not http!) connections to it. I want to redirect clients to their own ports ...
user23398's user avatar
  • 1,211
8 votes
2 answers
9k views

Cron job vs NodeJS setInterval for optimal performance

I'm building a simple nodejs script that updates a DNS record based on my current IP. The script works fine but I have some concerns regarding how should I run it. The check for my IP must be ...
Meletis's user avatar
  • 83
8 votes
4 answers
61k views

Node.js Site is Refusing Connection

I have a fresh Ubuntu instance setup on Amazon EC2. This instance has a node web server on it. When I try to hit my web site, I get an error in my browser. The error is: Connect: Connection refused ...
user3284007's user avatar
8 votes
1 answer
10k views

Nginx WebSocket reverse proxy keeps return 200 instead of 101

I'm currently trying to have a hack.chat on my personal server working. Long story short, it consists of two servers. The first is a simple httpd server serving javascript and CSS. The second one, ...
axellink's user avatar
8 votes
1 answer
3k views

Buffer requests to nginx for a short time if backend is down

I have a nodejs app on forever running behind nginx. When I deploy new code I just do forever restart but I can't afford to get 502 even in that short time. How to configure nginx to keep retrying at ...
Marin's user avatar
  • 193
8 votes
2 answers
9k views

NPM not installing dependencies?

Having trouble getting NPM to install dependencies with npm install -d in my project directory with a defined package.json file. Here's my package.json: https://gist.github.com/3068312 And after ...
neezer's user avatar
  • 810
7 votes
1 answer
9k views

Heroku Error R14 (Memory quota exceeded) using node.js

I been noticing that our node app runs out of memory after a day or so. The memory is consumed by a job that runs every minute or so, because that is pretty much the only thing going on right now. ...
Stan Wiechers's user avatar
7 votes
1 answer
11k views

Is it possible to reduce NodeJS memory usage (e.g., Ghost blogging platform)

CPU [ 0.0%] Tasks: 15, 2 thr; 1 running Mem [|||| 14/256MB] Load average: 0.00 0.00 0.00 Swp [| 1/256MB] Uptime: 15 days, 06:02:...
Aizan Fahri's user avatar
7 votes
2 answers
6k views

Content Length and Transfer Encoding Chunked nginx, node-http-proxy

I have the following setup - node-http-proxy acts as a reverse proxy forwarding all requests to nginx/socket.io as necessary My problem is this When I send a HTTP DELETE request from the browser, ...
rampr's user avatar
  • 458
7 votes
3 answers
13k views

Nginx not redirecting but is working

This is my first setup with nginx and I'm using it to proxy to nodejs. HTTP is on port 3000, and HTTPS is on port 3001. If I go to http://test.domain.com it loads the regular unsecure pages. If I go ...
romo's user avatar
  • 171
7 votes
1 answer
9k views

nodejs server hanging from time to time

I have a node server (0.6.6) running an Express application, along with Mongoose and s3, on an Ubuntu 11.04 machine. Several times per hour, the server is hanging. That means that the application is ...
Johann Philipp Strathausen's user avatar
7 votes
2 answers
3k views

Elastic beanstalk access private git repo

I am trying to currently add an ssh key to my elastic beanstalk instances using .ebextensions commands. The keys I have stored are in my application code and I try to copy them to the root .ssh ...
user221676's user avatar
7 votes
1 answer
16k views

Increasing the number of outbound TCP connections

I am developing a small test client for websockets. I am using Ubuntu 11.04 . I have read https://stackoverflow.com/questions/410616/increasing-the-maximum-number-of-tcp-ip-connections-in-linux and ...
Harihara Vinayakaram's user avatar
6 votes
1 answer
16k views

Checking file's existence by name in a GCS bucket with Node.js

I'd like to know if Google Cloud Storage provides an efficient way of checking if a file with a given name exists in a given bucket with node.js. A method such as bucket.fileExists('someName') would ...
Lex's user avatar
  • 191
6 votes
2 answers
5k views

Does elastic beanstalk run the postinstall from a package.json file?

I am using elastic beanstalk to deploy a node.js app. In my scripts section of package.json I have: "scripts": { "start": "node_modules/.bin/coffee server.coffee", "test": "NODE_ENV=test ...
Shamoon's user avatar
  • 911
6 votes
3 answers
4k views

cant get upstart script for node.js program to start on startup

I made a rather simple startup script for my node.js program that should run on startup: start on startup stop on shutdown script exec sudo -u max WEBSITES_DIR=/home/max/websites/ /usr/local/bin/...
Max's user avatar
  • 481
6 votes
2 answers
4k views

Does it make sense to reverse proxy Node.js through Apache?

Perfomancewise, does it make sense to redirect requests from an Apache VirtualHost to a Node.js instance? Does proxying counterbalance the awesome Node.js performance? FYI: I also need a couple of ...
Daniel's user avatar
  • 215
6 votes
3 answers
7k views

How to remove RC4 cipher from node.js https server running on Windows 2012 R2

Using ssllabs.com's scan tells me RC4 is in use. I read that RC4 should be disabled by default in Windows 2012 R2. I'm running a node.js server using https.createServer and not specifying ciphers (...
ciso's user avatar
  • 217
6 votes
2 answers
7k views

How can I configure a Haraka mail server to forward mails to another address on another domain?

I'd like to setup an Haraka mail server on a domain (let's say 'example.com') that will only act as a forwarding service to a 'gmail.com' email address. For the sake of the example let's say I'd like ...
juriejan's user avatar
  • 161

1
2 3 4 5
21