Questions tagged [mongoose]

Mongoose is a MongoDB object modeling tool, or ODM (Object Document Mapper), written in JavaScript and designed to work in an asynchronous environment.

Filter by
Sorted by
Tagged with
-2 votes
2 answers
302 views

How to best manage multilingual information in documents in JSON/MongoDB/Mongoose?

I have to manage multilingual information in JSON documents in a MongoDB/Mongoose context. But I'm in a dilemma regarding best the format to use with a view to performance metrics: I'm currently ...
user avatar
1 vote
0 answers
256 views

Refactor MVC to more scalable architecture?

Months ago I began a new web project which, in the beggining, seemed like a small application with virtually few users. I began the project by using the awesome Hackathon Starter WebApp Boilerplate by ...
user avatar
1 vote
0 answers
31 views

avoid passing dbsession object to multiple modules

I have a project which has a service-oriented architecture. for example, anything relates to payment is inside payment module. -dao -config -constatnts -middlewares -modules -payment -user -...
user avatar
  • 133
1 vote
1 answer
2k views

MongoDB - Do subdocuments count towards the total size of a document

I'm wondering if you had something like a list and a subdocument of items. Does MongoDB save them all as a single document, or does MongoDB regard the subdocuments as independent documents. This is in ...
user avatar
  • 217
1 vote
1 answer
620 views

Should be using MongoDB lookup or bulk update the data?

I am developing a social network app, we chose MongoDB as the storage for our app and mongoose as an ORM. Everything was going smoothly until one dark day the client said he needs to let the users to ...
user avatar
  • 111
0 votes
1 answer
287 views

Why does Angular 2 recommend using Services to make HTTP calls

In Angular 2's official tutorial, any operation involving getting or saving a class necessitates using a service. For a Hero class, they had to create a HeroService to perform all HTTP calls. This ...
user avatar
  • 163
3 votes
2 answers
1k views

Is it bad practice to generate ids for an object that does not yet exist in the database?

Here is the situation: There is a Mongo database A and there is Mongo database B. There is a business concept/Mongo object that is called someModel which exists on one of database B's collections. ...
user avatar
  • 1,554
1 vote
0 answers
77 views

Feedback on simple authorisation system design

I'm writing a fairly simple authentication/authorisation api for an intranet application we are developing. It's my first roles based authorisation system and its a good opportunity for a first ...
user avatar
  • 121
4 votes
1 answer
785 views

Filtering request and responses in RESTful MEAN stack

I have a very basic RESTful service written using the MEAN stack (MongoDb, Express.js, Angular.js, Node.js) and utilizing the Mongoose ODM. Product schema var productSchema = new mongoose.Schema({ ...
user avatar
  • 1,956