tagged [node.js]

How can I set NODE_ENV=production on Windows?

How can I set NODE_ENV=production on Windows? In Ubuntu it's quite simple; I can run the application using: However, this doesn't work on Windows. Is there a configuration file where I can set the att...

8 Mar at 04:38

Fast way to concatenate strings in nodeJS/JavaScript

Fast way to concatenate strings in nodeJS/JavaScript I understand that doing something like It is relatively very slow, as the browser does that in `O(n)` . Is there a faster way of doing so without i...

Function to convert timestamp to human date in javascript

Function to convert timestamp to human date in javascript How to convert this timestamp `1382086394000` to `2013-10-18 08:53:14` using a function in javascript? Currently I have this function:

How to send a POST request from node.js Express?

How to send a POST request from node.js Express? Could someone show me the simplest way to send a post request from node.js Express, including how to pass and retrieve some data? I am expecting someth...

1 Sep at 09:20

npm ERR! Error: EPERM: operation not permitted, rename

npm ERR! Error: EPERM: operation not permitted, rename When I execute `npm install` I get this error > npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async...

11 Mar at 10:5

Can you import node's path module using import path from 'path'

Can you import node's path module using import path from 'path' I prefer using the `import x from 'y'` syntax, but all I've seen online is `const path = require('path')`. Is there a way to import the ...

9 Jan at 17:15

How to determine the installed webpack version

How to determine the installed webpack version Especially during the transition from webpack v1 to v2, it would be important to programmatically determine what [webpack](https://webpack.js.org/) versi...

Is there a template engine for Node.js?

Is there a template engine for Node.js? I'm experimenting with building an entire web application using Node.js. Is there a template engine similar to (for example) the Django template engine or the l...

4 Jun at 13:55

What are "res" and "req" parameters in Express functions?

What are "res" and "req" parameters in Express functions? In the following Express function: What are `req` and `res`? What do they stand for, what do they mean, and what do they do? Thanks!

5 Feb at 19:39

HTTP GET Request in Node.js Express

HTTP GET Request in Node.js Express How can I make an HTTP request from within Node.js or Express.js? I need to connect to another service. I am hoping the call is asynchronous and that the callback c...

How to split and modify a string in NodeJS?

How to split and modify a string in NodeJS? I have a string : I want to parse each item after split and increment 1. So I will have: How can I do that in NodeJS?

28 Feb at 11:22

Is there a virtual environment for node.js?

Is there a virtual environment for node.js? I've searched the wiki modules page, but I can't find anything similar to virtualenv (python) or rvm. Anyone here separates node.js in their own env? I real...

Restart node upon changing a file

Restart node upon changing a file For someone who is coming from PHP background the process of killing node and starting it again after every code change, seems very tedious. Is there any flag when st...

17 Jul at 08:34

What is the difference between --save and --save-dev?

What is the difference between --save and --save-dev? What is the difference between: and: and: What does this mean? And what is really the effect of `--save` and `-dev` keywords?

20 Sep at 06:45

Calling Node.js from C# .NET

Calling Node.js from C# .NET Is it possible to call Node.js functions from a C# ASP.NET server? I found the Edge.js library, but as I understood, it allows Node.js to call into C#. I need the directly...

25 Oct at 17:30

Difference between "process.stdout.write" and "console.log" in node.js?

Difference between "process.stdout.write" and "console.log" in node.js? What is the difference between "process.stdout.write" and "console.log" in node.js? EDIT: Using console.log for a variable showe...

13 Feb at 22:59

How do I install a module globally using npm?

How do I install a module globally using npm? I recently installed Node.js and npm module on OSX and have a problem with the settings I think:

26 Jul at 19:29

cURL equivalent in Node.js?

cURL equivalent in Node.js? I'm looking to use information from an HTTP request using Node.js (i.e. call a remote web service and echo the response to the client). In PHP I would have used cURL to do ...

9 Feb at 19:2

How do I update Node.js?

How do I update Node.js? I did the following to update my npm: But I have no idea how to update Node.js. Any suggestions? (I'm using Node.js 0.4.1 and want to update to Node.js 0.6.1.)

8 Nov at 20:57

How to download a file with Node.js (without using third-party libraries)?

How to download a file with Node.js (without using third-party libraries)? How do I download a file with Node.js ? I don't need anything special. I only want to download a file from a given URL, and t...

29 Jan at 14:27

How to get a microtime in Node.js?

How to get a microtime in Node.js? How can I get the most accurate time stamp in Node.js? ps My version of Node.js is 0.8.X and the [node-microtime extension](https://github.com/wadey/node-microtime) ...

6 Mar at 06:42

How to list npm user-installed packages

How to list npm user-installed packages How do I list the user-installed / environment package in npm? When I do `npm -g list`, it outputs every package and their dependencies. Instead I'd like to see...

How to create streams from string in Node.Js?

How to create streams from string in Node.Js? I am using a library, [ya-csv](https://github.com/koles/ya-csv), that expects either a file or a stream as input, but I have a string. How do I convert th...

NodeJS w/Express Error: Cannot GET /

NodeJS w/Express Error: Cannot GET / This is what i have, the filename "default.htm" actually exists and loads when doing a readFile with NodeJS. The Error (in browser):

12 Nov at 07:22

How to create a directory if it doesn't exist using Node.js

How to create a directory if it doesn't exist using Node.js Is the following the right way to create a directory if it doesn't exist? It should have full permission for the script and readable by othe...

4 May at 16:43