Tagged Questions
0
votes
0answers
18 views
node.js server getting slow after a day or so
I'm new to nodejs. I have a basic node.js server which executes some tasks on the server and returns the result.
The problem is that server is getting too slow to respond after a day or some no. of ...
4
votes
1answer
35 views
Overriding node.js querystring.escape within a single module
I would like to use querystring.stringify on an object. The requirements for the string are slightly off-standard, with asterisk, slashes, and apostrophe all needing to be escaped. Querystring doesn't ...
0
votes
1answer
12 views
When Mongoose QueryStream emits an error event what is the state of the stream?
I am opening up a stream to my DB through mongoose and would like to know what is the state of the stream when it emits an error event? Does that mean an individual document that is being streamed had ...
0
votes
0answers
20 views
Socket.io emits to non-existing room
I'm writing a game and using socket.io. Every map in the game is represented by a room in socket.io.
It works like this. User runs a client and joins main room (lobby) which is an empty room "" in ...
0
votes
1answer
12 views
Nodejs + Rickshaw: src= reference not working
I am trying to make an app the generates 'live' graphs of Twitter word counts, basically trying to extend and exercise in Chapter 14 of NodeJS in 24 Hours. I decided to use 'Rickshaw' and I thought ...
0
votes
1answer
12 views
How do I set and read a cookie using socket.io?
I'm using socket.io in my node.js app and I'm trying to set a simple cookie and read back the value of the cookie later. How do I do that with socket.io? Does it support this natively or do I need to ...
1
vote
1answer
56 views
console.log not showing expected object properties
I have the following code in javascript in my node.js application.
However certain objects are not stored in my variable appointment. Even if I set them, when I directly access them it works: ...
0
votes
3answers
20 views
Same URL - render different pages (EXPRESS)
Is it possible to render different pages for the same URL in express?
For example, if I click on #login1, I want to be sent to /login_page/. If I click on #login2, I should still be sent to ...
0
votes
0answers
20 views
Node.js not connecting with mobile browsers
I've been working on a small radio player that uses node.js to create a websocket that pushes through updates to the song and artist when an xml file is updated and it work great on all desktop ...
0
votes
0answers
32 views
asynchronous callback within for loop - node js
The asynchronous callback within for loop of node js creates issue:
for(var index in workload.elements) {
var arr = [];
var resourceIdentifiers = {};
var elementinfo = {};
var ...
0
votes
1answer
12 views
MySQL, Selecting the index based on MIN timestamp
I am trying to get the index of the row with the maximum timestamp. However, I can't seem to get just the index. Here's my code:
client.query('SELECT inde, MIN( stamp ) FROM archive', function(err, ...
0
votes
1answer
28 views
Value of the variable becomes empty when accessed outside the function in node js
I have the following code :
for(var index in workload.elements)
{
var arr = [];
var resourceIdentifiers = {};
var elementinfo = {};
var ...
1
vote
0answers
21 views
Using the Tor api to make an anonymous proxy server
I am making an app which makes lots of api calls to some site. The trouble I've run into is that the site has a limit on the number of api calls that can be made per minute. To get around this I was ...
0
votes
1answer
23 views
HTML automatic site login filling. value with no parameters
The website im trying to login to has the following username field
<input type="text" id="inputEmailHandle" name="inputEmailHandle" value>
Im using Zombie Headless browser and nodejs, Zombie ...
0
votes
0answers
9 views
Node.js, protobuffer, buffer.lentgh.. how to send structured buffer/message trough tcp?
I had wrote a node/ssjs program that makes:
Tcp connection to data server(Apache MIMA), using TLS module. (OK)
Encode/decode(serialize/deserialize) messages through protobuffer module.. (OK)
Send ...
0
votes
0answers
4 views
Coming from AOP based authentication in ASP.MVC to nodeJS
When I am in the .net world and using MVC a common pattern used when wanting to do cross cutting concerns such as logging, authentication, transaction management etc I would use DI paired with AOP to ...
0
votes
1answer
9 views
Node.js and serialport ; Callback method?
I'm trying to list the all serial ports and select the port name that begins with /dev/cu.usbmodem. For context; it's an arduino hooked up to a RaspberryPi running node. The Raspberry Pi has a habit ...
0
votes
1answer
23 views
How to append a attribute to already existing JSON using node js
I have a JSON as follows:
{
"elements": [
{
"name": "F975CFAF-8FB4-2926-DD56-74CD230D15AF",
"uri": "vm/hpcloud/nova/large",
"parameters": {
"imageUri": ...
1
vote
1answer
30 views
javascript promise not passing all arguments (using Q)
I am having trouble passing all arguments. My promise callback only receives one instead of three:
var asyncFunction= function(resolve) {
setTimeout(function() {
resolve("Some string that ...
2
votes
0answers
46 views
Upload a large file (1GB) with node and express
Trying to upload a large file to a node js instance using express and it will fail with large files.
With the following errormessage:
What can I do to prevent this error (I don't want to chunk the ...
0
votes
1answer
22 views
how to avoid Uncaught ReferenceError
I have the below module export in my javascript file, so that I can access it from node.js based build setup (grunt, require..).
....
if(module && module.exports) {
module.exports ...
1
vote
2answers
29 views
Comparison to -1 or undefined don t work, either with == or ===
Here a sample of code:
do
{
line=gets(smil);
if (line===-1){console.log("Abort");callback(-1);}
console.log("line= "+line);
}while(line.search("<video")===-1);
The first output goes ...
1
vote
2answers
31 views
How to execute a undefined number of funcA() and funcB() before starting funcC()?
I have a app writed in javascript.
To work, I need to download a bunch of files.
Since I can have a lot of file wich can be long, I made the download asynchronous:
function download_all(xml, ...
0
votes
1answer
15 views
Resizing and compressing AJAX images in Node/AngularJS application
I'm building an app in AngularJS, built on Node/ExpressJS. I have a list of images which are hosted externally (and I have no access to them to compress them at the source).
The issue is, that often ...
0
votes
1answer
25 views
making a data application that will store data on each day on the calander
i am having a bit of a problem, i am sure this question has been asked but i cant figure my way to google it or find it here.
i am building an web app with angular and node.
my task is that every ...
1
vote
2answers
49 views
String search that ignores “a”, “the”, etc. with JavaScript
I'm looking for something like:
if(magicSearch("hot pizza","We sell pizza that is really hot") {//Found!}
I only want a "true" if both words appear (any order) and I want it to ignore things like ...
0
votes
2answers
32 views
Generate ical file with Meteor
Is there some workaround to generate ical files from meteor (javascript)?.
I've have found this https://github.com/sebbo2002/ical-generator but I don't know how to use it into a Meteor project. ...
0
votes
1answer
17 views
Rounding Numbers before Socket.io emit?
I'm using Nodejs with Socket.io.
I want to minimize the size of the data I'm sending. I want to send numbers to the client. My numbers have great precision but the client only need to know the first ...
0
votes
0answers
14 views
What is the logic for creating content excerpt in JavaScript
I'm creating an open-source CMS in Node.js, but I'm not so sure on one thing on what is the right logic of creating a content excerpt in JavaScript.
I'm using Nunjucks template for rendering the ...
0
votes
2answers
14 views
module as folder, but index.js under the folder only contains some require statements
I am learning the source code of hexo, a project based on node.js.
And there is a file init.js:
if (results.config){
require('./plugins/tag');
require('./plugins/deployer');
...