0
votes
1answer
25 views

Browser (or node ?) adding parameters automatically to http request

I have a node.js server with express.js and everything has been working well so far, but suddenly I have this very strange bug : My request to the domain base URL that means in my browser I typed ...
1
vote
0answers
9 views

Websocket form handling

I'd like to send JSON form data to websocket server instead of submitting the form and reload the page. In AJAX it is pretty simple and straightforward thanks to native FormData() web-api object: ...
0
votes
1answer
28 views

How to escape a string to valid filename with Node.js

I have a string with a varying company name, which can contain different kinds of special characters. I need to escape this company name to be a valid filename on a Unix filesystem. Does Node.js ...
0
votes
2answers
17 views

Node.js - How to Backup Variables to a file and reobtain it on server relaunch?

I think the title says it all. But I want to explain further. Let's say, I have a running nodejs server which contains a variable that will contain (almost) all data that the server will store. If I ...
0
votes
1answer
22 views

Socket return object Object

i have following nodejs code: function setUpTaxiEvents(socket){ socket.on("taxi:register",function(token){ console.log('Registered taxi with token ', token); var taxi = ...
0
votes
0answers
8 views

Nodejs - Error Event not Firing when trying to connect to a non-existing server

I have my working Nodejs Server and Client communication. Is there a way to detect if the Client Side has been connected to the server side? My script is checking the the 'error' event to fire, but ...
0
votes
1answer
9 views

Trying to setup Node.js (Express) to work with vhosts, and getting unexpected errors

I'm trying to set it up to work with a couple vhosts, so that I could manage everything through the one node app; but I've been getting this error. It's late right now, so my mind isn't 100%, but ...
0
votes
1answer
15 views

Run CoffeeScript class in browser and in node

I have a class in CoffeeScript that I would like to use both on the server and in the broser. For the server I need class classname constructor: (@arg)-> #code module.classname = ...
1
vote
0answers
23 views

Error: invalid signature: 0x4acf92ad (at position: 0x29)

I was trying to convert excel into json in node. I found a few modules that may be helpful. I tried npm excel https://npmjs.org/package/excel‎ My app.js var express = require('express'); //Call ...
0
votes
0answers
30 views

best practices in express configuration

this is my configuration in app.js app.set('port',26000 || process.env.PORT); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); ...
-1
votes
1answer
29 views

Text Editor Require.js [closed]

I am new to webdevelopment, particularly Require.js and Node.js Could you help me with any good Text Editors to work with Require. I am currently using Notepad++, its good alternative of notepad, ...
0
votes
1answer
23 views

what is the user agent string (github api)

So, I'm attempting to make an HTTP request to github to return a list of all the issues on a particular github repository. I'm using coffeescript in my code below but it should be fairly self ...
0
votes
0answers
19 views

Postgresql+Node.js queries start failing after a few tries

I have a node.js app with a postgresql database running on Heroku and for some reason select functions seem to break and start failing after many successful attempts for what seems to be no reason at ...
1
vote
1answer
29 views

Having trouble iterating through array and saving to mongoose. Callback issue?

I'm learning node, express, mongo, and, in the process, javascript. I'm trying to get a feature where using rssparser, get a list of stories and save them to a mongo database with mongoose. I've got ...
0
votes
0answers
24 views

UDP scrape in node.js not returning any torrent data

I'm writing an app partly in NodeJS for handling torrent downloads on my Raspberry Pi. I've been stuck for a while trying to perform a successful UDP scrape from public UDP trackers such as ...
-4
votes
2answers
28 views

NodeJS Server Side Javascript - Store array as a file and read back in

2d Map programs like Tiled allow you to build a world for your game and then save it out to a file. If you want, you can then get the array corresponding to your map and your tileset. I like to save ...
4
votes
2answers
85 views

JavaScript Time Zone is wrong for past Daylight Saving Time transition rules

In 2007, the days that we switch to daylight savings time changed. Any date that falls within the extend range of DST prior to that change is reporting an incorrect timezone offset in Chrome and ...
0
votes
0answers
17 views

Node.js Sessions With Connect WITHOUT Express? Newbie

How do I implement sessions with Connect & Node.js without Express? Every tutorial I've come across uses Express.. how do I do it without Express? I inherited this code and don't know anything ...
0
votes
0answers
8 views

winston module not behaving properly

How can I update log file when using Winston to handle logging for node.js. Below is the code which I tried. Only first time the data is getting saved in log file. var logger = new (winston.Logger)({ ...
0
votes
1answer
22 views

req.user is undefined when trying to get it from api methods

I have two files in routes folder - index.js and api.js. index.js only sends the main template page with linked styles, images and scripts. api.js manages all the API calls. I am implementing ...
-1
votes
2answers
46 views

javascript: find all matched keywords in a string [closed]

I am trying to parse a big chunk of text to find all the matched keywords. I have all the keywords in an array. for eg: var string = "hi, I need support for apple, android and nokia phones."; var ...
-1
votes
0answers
38 views

Combine node.js and Django? [closed]

I'm so interested in learning node.js and i have some trining in Django. I'd like to know if you can combine in One Project these two backend tecnologies. I'd like to use Django for the architecture ...
0
votes
0answers
48 views

Possible resource leak in node.js

Good morning! I've been looking at node.js source code and found an interesting code Just have a look at callback function for fs.open call. Whould fd leak if any kind of exception is thrown here or ...
0
votes
0answers
18 views

Grunt test for UMD

I'm trying to figure out the best approach to testing a Javascript module definition using a UMD factory, similar to this: https://github.com/umdjs/umd/blob/master/returnExportsGlobal.js I don't want ...
1
vote
1answer
44 views

Node.js equivalent of fopen/fprintf

I'm trying to write a text file from node.js where the contents will be calculated line by line so building a string for writing in one shot would take quadratic time, and writing line by line seems ...
1
vote
1answer
33 views

If a nodejs module exports an object to two other modules, do changes made to that object in one downstream module propagate to the other?

I originally had a working application in nodejs which had all of its code in one file, split out into discrete chunks using constructors and IIFEs. In order to provide sensible decoupling and ...
1
vote
2answers
26 views

Using node-validator to strip HTML tags from a string

I'm looking for a way to strip tags from a string in the backend using NodeJS. A few answers here have suggested trying node-validator but neither the docs nor any answers explain specifically how to ...
0
votes
0answers
16 views

Object #<Server> has no method 'use' [Express+ShareJS]

Environment Express 3.2.4 ShareJS 0.6.2 OS X 10.8.3 Goal I am trying to get ShareJS running inside of an Express app. Problem I get the following error on running node app.js: ...
0
votes
0answers
22 views

how to make custom modules accessibly globally

I have written several custom nodejs modules and I want to be able to access them anywhere I run my node apps. I have tried placing them in the same directory I installed nodejs in, but that doesn't ...
0
votes
1answer
28 views

use a typescript module/class in the browser and in the server (Node.Js)

How would I use the same typescript class or module in a client side javascript file and in a server side node.js file? I found a solution here where you manually create the exports variable instead ...

1 2 3 4 5 224
15 30 50 per page