I am using sails js with mongodb.
here is my EventTags model:
EventTags.js
module.exports = {
schema: true,
attributes: {
eventList: {
collection: 'Events',
via:'tagList'
},
…
I am trying to decide what database to use in a Sails project. I started with localDisk and it works fine. I wonder why a database like Postgres or Mongo is needed. Could someone explain to me?
Also since waterline abstracted the underlying…
I'm creating a Sails application for which I got to do a panel administration for transactions to a model database. The point is, the backend architecture and data administration requires distinct databases for for same model in Sails application.…
![enter image description here][1]
I'm using sailsJs in my application. My server runs properly in my local, but server throws error "process.nextTick() Error : Can't set header after they sent".
Local version is working fine, But server throws…
I'm implementing a messaging app in SailsJS, but I need to mark an specific message when has been read.
Right now users need to click on the conversation and browser will load the messages related. How Can I do that?
This is my Conversation…
i'm totally new to sails association.
i want to publish (publishCreate and publishUpdate) socket events in associated collection.
i got one solution on Sails publish(Update) system does not propagate to associations
my code is like…
Using sails.js I got these controller methods which perform db requests and use promises. The problem is that they're working but when a request is performed a 504 is obtained at client side.
I want to make sure my implementation is good and the 504…
I am using this passport-generate-auth module, and I am trying to get my grasp around understanding this whole thing.
So, in my User model, I've got
var User = {
schema: true,
attributes: {
username: {
type: 'string',
…
I'm using SailsJS, so Waterline ORM and MongoDB.
I'm saving multiple user IDs in an object within a collection called Labels (this is so that a label can belong to multiple users).
I have a data structure in Mongo something like this:
labels: {
…
I'm using Sails 0.11. Their docs say it is possible to post multiple objects to a blueprint route, just passing a JSON array.
I'm trying to do this, but I'm getting 400 bad request as response.
This is my case:
I have a model called Prediction,…
I'm building a sails.js api with MongoDb as my db.
Those are my models (simplified just for the sake of this question):
models/Passport.js simplified:
identifier: {
type: 'string'
},
owner: {
model: 'User',
required: true
…
I post here , because I recently start a development project with sails and MongoDB 3.0.2.
I am a beginner with this framework and his ORM (aka waterline).
In my project I've two classes : listeners and titles, and I need to do this relations :
N…
I want to create an API service for a project. I'm creating this service with Sails.js. I pushed this Sails app on my dedicated server running with pm2.
My problem is that each 2 minutes I can't access to the data of my MongoDB database, running on…
I want to proceed with more advanced queries in a sailsjs and mongodb stack where sailsjs is setup to serve as an api with data against a front end client. I've been able to fetch data with some basic queries but now looking into on how to proceed…
I try to associate a chat message with an user. But the populate function gives me an user undefined
//message.js
module.exports = {
attributes: {
user:{
model: 'User'
},
message:{
type:'string',
required:true
…