tagged [node.js]
How to process POST data in Node.js?
How to process POST data in Node.js? How do you extract form data (`form[method="post"]`) and file uploads sent from the HTTP `POST` method in [Node.js](http://en.wikipedia.org/wiki/Node.js)? I've rea...
How to return values from async functions using async-await from function?
How to return values from async functions using async-await from function? How can I return the value from an async function? I tried to like this it returns me this,
- Modified
- 20 Apr at 09:45
How to get GET (query string) variables in Express.js on Node.js?
How to get GET (query string) variables in Express.js on Node.js? Can we get the variables in the query string in Node.js just like we get them in `$_GET` in PHP? I know that in Node.js we can get the...
- Modified
- 4 May at 12:1
require file as string
require file as string I'm using node + express and I am just wondering how I can import any file as a string. Lets say I have a txt file all I want is to load it into a variable as such. I am against
Node.js project naming conventions for files & folders
Node.js project naming conventions for files & folders What are the naming conventions for files and folders in a large Node.js project? Should I capitalize, camelCase, or under-score? Ie. is this con...
- Modified
- 27 Oct at 08:18
Node.js Mongoose.js string to ObjectId function
Node.js Mongoose.js string to ObjectId function Is there a function to turn a string into an objectId in node using mongoose? The schema specifies that something is an ObjectId, but when it is saved f...
convert string to number node.js
convert string to number node.js I'm trying to convert req.params to Number because that is what I defined in my schema for year param. I have tried and and but non of them works. Do I need to install...
- Modified
- 17 May at 08:58
How to sort in mongoose?
How to sort in mongoose? I find no doc for the sort modifier. The only insight is in the unit tests: [spec.lib.query.js#L12](https://github.com/Automattic/mongoose/blob/13d957f6e54d6a0b358ea61cf943769...
- Modified
- 13 Dec at 08:15
Print a list of all installed node.js modules
Print a list of all installed node.js modules In a node.js script that I'm working on, I want to print all node.js modules (installed using npm) to the command line. How can I do this?
- Modified
- 6 Dec at 09:37
node.js - how to write an array to file
node.js - how to write an array to file I have a sample array as follows I would like to write this array to a file such as I get a f
- Modified
- 12 Jul at 14:24
Passing variables to the next middleware using next() in Express.js
Passing variables to the next middleware using next() in Express.js I want to pass some variable from the first middleware to another middleware, and I tried doing this, but there was "`req.somevariab...
- Modified
- 23 Sep at 14:3
How to split string with newline ('\n') in Node?
How to split string with newline ('\n') in Node? Within Node, how do I split a string using newline ('\n') ? I have a simple string like `var a = "test.js\nagain.js"` and I need to get `["test.js", "a...
- Modified
- 20 Apr at 23:46
In nodeJs is there a way to loop through an array without using array size?
In nodeJs is there a way to loop through an array without using array size? Let's say I have I tried It prints 0 1 What I wish is to have item1 item2 Is there any other syntax that works witho...
- Modified
- 1 Apr at 20:22
javascript node.js next()
javascript node.js next() I see a lot of use `next` in node.js. What is it, where does it come from? What does it do? Can I use it client side? Sorry it's used for example here: [http://dailyjs.com/20...
- Modified
- 21 Mar at 22:44
How to install a node.js module without using npm?
How to install a node.js module without using npm? There are quite a few modules which are listed [on node's github page](https://github.com/joyent/node/wiki/modules) but are not published with the np...
What is Express.js?
What is Express.js? I am a learner in [Node.js](http://en.wikipedia.org/wiki/Node.js). 1. What's Express.js? 2. What's the purpose of it with Node.js? 3. Why do we actually need Express.js? How is it ...
Copy folder recursively in Node.js
Copy folder recursively in Node.js Is there an easier way to copy a folder and all its content without manually doing a sequence of `fs.readir`, `fs.readfile`, `fs.writefile` recursively? I am just wo...
- Modified
- 22 Aug at 20:44
req.query and req.param in ExpressJS
req.query and req.param in ExpressJS ## Main differences between req.query and req.param in Express - - Suppose android sends a POST request -> Intention is to send (Key,Value) to client and the serv...
After installation of Gulp: “no command 'gulp' found”
After installation of Gulp: “no command 'gulp' found” After installing [gulp.js](http://gulpjs.com/) via npm, I receive a `no command 'gulp' found` error when running the `gulp` command from the same ...
- Modified
- 26 Apr at 00:56
Is it possible in .NET, using C#, to achieve event based asynchronous pattern without multithreading?
Is it possible in .NET, using C#, to achieve event based asynchronous pattern without multithreading? I am amazed by the architectural design of [Node.js](http://en.wikipedia.org/wiki/Node.js) and was...
- Modified
- 20 Nov at 15:48
node.js - request - How to "emitter.setMaxListeners()"?
node.js - request - How to "emitter.setMaxListeners()"? When I do a GET on a certain URI using the node.js 'request' module; ``` "(node) warning: possible EventEmitter memory leak detected. 11 listene
- Modified
- 22 Feb at 21:54
How to tell eslint that you prefer single quotes around your strings
How to tell eslint that you prefer single quotes around your strings I'm new to eslint and it's spewing out a ton of errors telling me to use doublequotes: That's not my preference. I've got an .eslin...
How to append to a file in Node?
How to append to a file in Node? I am trying to a string to a log file. However writeFile will erase the content each time before writing the string. Any idea how to do this the easy way?
- Modified
- 8 Jul at 18:6