Tag Archives: node.js

How do I single sign on between Bugzilla and Node.js?

Questions: Bugzilla runs behind the Apache webserver (mod_perl2) and stores the users in MySQL database. Node.js is it’s own webserver. How do I single sign on the user in the Node.js app using the user data which present in Bugzilla’s MySQL database? Update: As Ravi has mentioned in comments below, I am not looking for… Read More »

getting node.js app to work on port 3001

Questions: ok, this one is confusing me greatly! If I add this to my apache conf: ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /node> ProxyPass http://localhost:3001/ ProxyPassReverse http://localhost:3001/ </Location> now, when I go to …/node, i see the following page: “Welcome to socket.io.” But what I want to happen, is to… Read More »

How can I create an rss file in node.js?

Questions: How would I go about generating or updating an rss file in node.js? Thanks Answers: https://github.com/dylang/node-rss – RSS feed generator for Node Fast and simple Javascript-based RSS generator/builder for Node projects. The next time you need a node.js module, look here: http://search.npmjs.org/

node.js equivalent of a standard PHP ajax saving scheme

Questions: In a JavaScript (client) + PHP (server) website, I have this scheme for saving an “online notepad” (in a #textbox textarea) to server: // client-side $(“#save-button”).on(‘click’, save); function save(e) { $.ajax({ type: “POST”, url: “/php/save.php”, data: { projectname: $(‘#projectname’).text(), data: $(‘#textbox’).text() }, success: function(data) { alert(‘Data saved’); }, error: function(data) { console.log(data); } });… Read More »

What are the main differences between APE and Node.js?

Questions: Could anyone that has used both share his/her experience? What are the main differences and which one do you prefer? Thank you. Answers: Different socket.io vs APE: socket.io is coded in javascript(node.js) while APE is coded in C. I believe that is a big difference when you want to contribute. Maybe because you like… Read More »

File upload with nginx and node.js

Questions: I am trying to configure nginx to manage files upload for node.js app. I have followed this tutorial: https://coderwall.com/p/swgfvw/nginx-direct-file-upload-without-passing-them-through-backend I have made it with the following configuration: server { listen 80; server_name example.com; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection ‘upgrade’; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location /upload… Read More »

Node.js in container always get the docker0 ip

Questions: I host an node.js server with express.js in a docker container. The address of my container is 172.17.0.62 And I use nginx to redirect the traffic to 172.17.0.62 I can access the my server. But when I use console.log(req.ip + ‘ ‘ + req.protocol + ‘ ‘ + req.originalUrl); to log the traffic. req.ip… Read More »

How can I create an rss file in node.js?

Questions: How would I go about generating or updating an rss file in node.js? Thanks Answers: https://github.com/dylang/node-rss – RSS feed generator for Node Fast and simple Javascript-based RSS generator/builder for Node projects. The next time you need a node.js module, look here: http://search.npmjs.org/

Enable Cors on node.js app with nginx proxy

Questions: I have set up a digital ocean droplet that is a reverse proxy server using nginx and node. I used this tutorial from digital ocean as a starting point https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04. I have also set up ssl with lets encrypt. The issue I am currently having is that I am unable to make cross domain… Read More »