tagged [node.js]

Mongoose - What does the exec function do?

Mongoose - What does the exec function do? I came across a piece of Mongoose code that included a query findOne and then an exec() function. Ive never seen that method in Javascript before? What does ...

19 Jan at 21:30

npm WARN npm npm does not support Node.js v9.1.0

npm WARN npm npm does not support Node.js v9.1.0 I updated to the latest node v9.1.0 and now npm doesn't work. > npm WARN npm npm does not support Node.js v9.1.0

10 Nov at 15:31

Folder structure for a Node.js project

Folder structure for a Node.js project I notice that Node.js projects often include folders like these: > /libs, /vendor, /support, /spec, /tests What exactly do these mean? What's the different betwe...

29 Dec at 10:35

DOM element to corresponding vue.js component

DOM element to corresponding vue.js component How can I find the vue.js component corresponding to a DOM element? If I have Is there a vue method equivalent to the jQuery

2 Feb at 06:55

can you host a private repository for your organization to use with npm?

can you host a private repository for your organization to use with npm? Npm sounds like a great platform to use within an organization, curious if a private repo is possible, like with Nexus/Maven. N...

27 Sep at 21:1

How to change node.js's console font color?

How to change node.js's console font color? I had to change the console background color to white because of eye problems, but the font is gray colored and it makes the messages unreadable. How can I ...

14 Feb at 12:25

How to set custom favicon in Express?

How to set custom favicon in Express? I recently started working in Node.js and in the app.js file there is this line: Now, how do I set up my own custom favicon.ico?

12 Mar at 16:49

Passing a variable from node.js to html

Passing a variable from node.js to html I am trying to pass a variable from node.js to my HTML file.

15 Mar at 15:56

How to unpack an .asar file?

How to unpack an .asar file? I have packed my Electron application using the following command: Now, I need to unpack it and get the whole code back. Is there any way to do so?

7 Aug at 00:28

Global Variable in app.js accessible in routes?

Global Variable in app.js accessible in routes? How do i set a variable in `app.js` and have it be available in all the routes, atleast in the `index.js` file located in routes. using the express fram...

14 Aug at 11:1

How to sort a collection by date in MongoDB?

How to sort a collection by date in MongoDB? I am using MongoDB with Node.JS. I have a collection which contains a date and other rows. The date is a JavaScript `Date` object. How can I sort this coll...

12 Dec at 20:18

node.js remove file

node.js remove file How do I delete a file with node.js? [http://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback](http://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback) I do...

22 Feb at 13:51

What is the "__v" field in Mongoose

What is the "__v" field in Mongoose I'm using `Mongoose` version 3 with `MongoDB` version 2.2. I've noticed a `__v` field has started appearing in my `MongoDB` documents. Is it something to do with ve...

2 Jun at 15:6

npm install hangs

npm install hangs This is my `package.json`: Now, when I open the cmd and run `npm install`, the install hangs. What am I doing wrong?

1 Jun at 14:59

How can I update npm on Windows?

How can I update npm on Windows? I tried [this](http://davidwalsh.name/upgrade-nodejs): ...but it didn't work. How do I do this on Windows?

12 Jan at 15:28

How to host a Node.Js application in shared hosting

How to host a Node.Js application in shared hosting How to host a Node.Js application in a shared hosting I want to host a node.js application in shared hosting. Does anyone have any reference or docu...

19 Dec at 07:41

How to paginate with Mongoose in Node.js?

How to paginate with Mongoose in Node.js? I am writing a webapp with Node.js and mongoose. How can I paginate the results I get from a `.find()` call? I would like a functionality comparable to `"LIMI...

26 Jun at 15:18

module.exports vs exports in Node.js

module.exports vs exports in Node.js I've found the following contract in a Node.js module: I wonder what's the difference between `module.exports` and `exports` and why both are used here.

24 Jul at 12:33

send Content-Type: application/json post with node.js

send Content-Type: application/json post with node.js How can we make a HTTP request like this in NodeJS? Example or module appreciated.

25 Jan at 18:22

using process.env in TypeScript

using process.env in TypeScript How do I read node environment variables in TypeScript? If i use `process.env.NODE_ENV` I have this error : I have installed `@types/node` but it didn't help.

19 Jul at 15:11

How do I get the time of day in javascript/Node.js?

How do I get the time of day in javascript/Node.js? I want to get , 1 being 1am Pacific Time. How can I get that number in Node.JS? I want to know what time it is in Pacific time right now.

9 Sep at 06:5

How to change to an older version of Node.js

How to change to an older version of Node.js I am running Node.js version `v0.5.9-pre` on Ubuntu 10.10. I would like to be using version `v0.5.0-pre`. How do I roll back to the older version of node?

11 Jun at 02:25

HTML-parser on Node.js

HTML-parser on Node.js Is there something like Ruby's [nokogiri](http://nokogiri.org) on nodejs? I mean a user-friendly HTML-parser. I'd seen on Node.js modules page some parsers, but I can't find som...

30 Dec at 13:13

Code coverage with Mocha

Code coverage with Mocha I am using Mocha for testing my NodeJS application. I am not able to figure out how to use its code coverage feature. I tried googling it but did not find any proper tutorial....

Node update a specific package

Node update a specific package I want to update my Browser-sync . How can I achieve this? My current version of Browser-sync does not have the Browser-sync GUI :(