Tag Archives: node.js

npm excel-export (Node.js) corrupt files

Questions: I need to export some data from my node.js application into an excel spreadsheet (for qa purposes). I looked online and found the convenient npm module called “excel-export”. I installed it and followed the example that can be found here (https://www.npmjs.org/package/excel-export). It works fine, but I have one issue. When I open the file… Read More »

How to style xlsx files in node.js

Questions: I’m exporting a file generated by xlsx.js with my node.js express application server. I’d like to know how to put bold in first line, set auto width and (eventually) colour borders. For example, the first line of the worksheet looks like: var data = [[ {value:”EXTREMELY LONG TITLE 1″, bold: 1, autoWidth:true}, {value:”TITLE2″}, {value:”TITLE3″}… Read More »

Cannot connect to SQL Server with Node.js and Tedious

Questions: When I try to use Node.js and Tedioius to connect to a local SQL Server instance I get this error: { [ConnectionError: Failed to connect to XXXXX:1433 – connect ECONNREFUSED] name: ‘ConnectionError’, message: ‘Failed to connect to XXXXX:1433 – connect ECONNREFUSED’, code: ‘ESOCKET’ } Here is my connection object: var config = { userName:… Read More »

Node-SQL with node.js and MS integrated Security

Questions: I have some sample code that is successfully connecting to SQL Server using Microsoft SQL Server user name and password. But I was wondering if there is a way to use integrated security with this script. Basically which means use the logged in user’s credentials without supplying a password in the script. var sql… Read More »

Uexpected token 'tag' jade node.js

Questions: I get: Unexpected token ‘tag’ expected ‘text’, ‘code’, ‘:’, ‘newline’ or ‘eos’ because of this code: label(for=”polaziste”)Polaziste in #main form(action=”/raspored” method=post) label(for=”polaziste”)Polaziste input(type=”list” id=”polaziste”) datalist#polaziste for pol,i in popis option(value = pol) Why? 🙂 Answers: Try this: label(for=”polaziste”) Polaziste Notice space before Polaziste. Questions: Answers: For others visiting, this error also (expectedly) appears when… Read More »

Node.js web application browser compatibility

Questions: I heard node.js is an ideal framework for building real time web application (chatting, live feeds etc…), then i guess it involve lot of socket io connection between nodejs and client browser. in client side do i have to use websocket(html5) in order to communicate with node.js, if that is the case, then most… Read More »

including js files with html and node.js

Questions: I am performing messaging via websockets between a HTML5 client and server running on node.js. Naturally I chose JSON as the message format and as such created common javascript code, defining the various message content types and transformation operations. The javascript code is shared between both projects. I created my web client as one… Read More »