Questions tagged [mean-stack]

The MEAN stack is a methodology that employs MongoDB, Express, Angular / AngularJS, and Node.js to provide a complete end-to-end system. One of the primary motivations for such a stack is that it is pure JavaScript at all ends. Two different implementations are available: mean.io and mean.js

MEAN (an initialism for Mongo, Express, Angular, Node) stack can be implemented just as LAMP stack is implemented, with or without a specific framework or architecture as the four technologies can be implemented in completely different ways.

A ready-to-go implementation is available at meanjs.org.

Related tags:

3884 questions
11
votes
2 answers

Mongoose: Error cannot find module debug

I'm building a basic MEAN webapp and am new to the stack. I have the front end running, but as soon as I add the following lines to app.js: var mongoose =…
Carriemf
  • 159
  • 1
  • 3
  • 12
11
votes
7 answers

“EMALFORMED Failed to read bower.json” "unexpected token /"

i rather new to mean stack and i'm trying to pull some components using bower. I have my .bowerrc file which gives the path for installation. //.bowerrc { "directory": "public/libs" } and i have my bower.json file which looks like this: //…
user2656851
  • 1,643
  • 4
  • 12
  • 15
10
votes
4 answers

CoreMongooseArray to Normal Array

I'm shortlisting the 2 elements from one schema and want to update in another schema. for that i used slice method to shortlist first 2 elements from an array. but am Getting CoreMongooseArray ['element1','element2'] instead of ["element1",…
vinaykumar0459
  • 497
  • 1
  • 6
  • 19
10
votes
5 answers

Node js authentication in cross domain

I am working on a MEAN application, I am using Angular 4 for my project. For authentication, I have implemented the Passport js Local-strategy. And I am maintaining persistent session using Express-session. Things are working fine till here. The…
Arpit Kumar
  • 2,179
  • 5
  • 28
  • 53
10
votes
2 answers

TypeError: The "digest" argument is required and must not be undefined

I am getting subject error while registering a simple Mean Application through http://localhost:3000/auth/register, that I have simply created using mean init command. pbkdf2 or crypto is generating the error and I have no idea where to look for…
Umair Malhi
  • 565
  • 1
  • 5
  • 16
10
votes
2 answers

What's the best way to mix passport-facebook and passport-jwt?

I am kind of new to Node.js development and currently working on a pet project on my free time. So far I have created JWT authentication using passport and passport-jwt for the strategy and I am using it in all of my RESTful APIs. Now I am thinking…
Tohid
  • 21,535
  • 8
  • 30
  • 43
10
votes
1 answer

How to Host node application in IIS?

I am developing an application in mean-stack. The only the difference is that I want to host my application in IIS rather than express.js. Is it possible or feasible to do so? What are possible advantages and disadvantages? Thanks in advance.
Prashant Mohite
  • 758
  • 2
  • 7
  • 19
10
votes
5 answers

Debugging server side with node.js

I have a burning question in my head regarding debugging, you see when I am writing Javascript client side I can go to Chrome's console and track my variables and objects etc to see what is happening with my code better.. I am just not able to get…
mysamza
  • 387
  • 1
  • 6
  • 22
10
votes
3 answers

How to use node-inspector with `npm start` for my application?

I am using npm start to start my MEAN stack application, but I would like to use the node-inspector to debug some Mongoose. I know I can start the node inspector with node-inspector, but what can I substitute node --debug app.js with to make npm…
Melissa
  • 1,236
  • 5
  • 12
  • 29
9
votes
2 answers

How to prepare nodejs for production?

I have a MEAN Stack app that I need to host on CPanel and I have never deployed an app before. It is easy to deploy Angular part of the app by creating a bundle in dist folder using the command: ng build --prod But I would like to know how should I…
harshit raghav
  • 593
  • 2
  • 9
  • 23
9
votes
3 answers

How to run background task in node.js api after sending response?

I have a requirement, where i have to run a one minute background process after returning the response for an api. That background process will do some operation on mongodb. My approach is, i am emitting an event for background process after…
aaqib90
  • 510
  • 1
  • 5
  • 16
9
votes
1 answer

Executing Multiple Sequelize JS model query methods with Promises - Node

I am having a problem retrieving data from database using sequelize js. I am new to NODEJS. I don't know if Promise and Promise.all are built in functions So i install and require npm promise in my code too. Below is my code. var Promise =…
Syed Danial
  • 635
  • 1
  • 6
  • 16
9
votes
2 answers

Pass API data from one component into another component?

I am learning Full-stack Angular4, and wanted to know how would I be able to get data from a get call from one component into another so I can relay the data into the html page with {{data.name}}? I tried importing the component into the other…
M Q
  • 233
  • 1
  • 4
  • 12
9
votes
2 answers

Mongoose how to write a query with if condition?

Suppose I have the following query: post.getSpecificDateRangeJobs = function(queryData, callback) { var matchCriteria = queryData.matchCriteria; var currentDate = new Date(); var match = { expireDate: { $gte: new Date(currentDate.getFullYear(),…
jones
  • 1,423
  • 3
  • 35
  • 76
9
votes
1 answer

How does Express know which Router path to use when multiple paths match?

Say there are 2 router.route(), for example: router.route('/app/:id').get(funtion(req, res, next){ console.log("id route") }); and router.route('/app/:username').get(funtion(req, res, next){ console.log("user route") }); When GET…
NathanSuzuki
  • 157
  • 2
  • 8