Questions tagged [sails-mongo]

MongoDB adapter for Sails.js

Sails-mongo allows connecting to from using the ORM api.

400 questions
1
vote
1 answer

Integrating node_acl module with SailsJs

Iam trying to implement role based authentication with sails js and use node_acl middleware. Has anybody tried it before? What i see from acl documentation is //Using the mongodb backend acl = new acl(new acl.mongodbBackend(dbInstance,…
jsphdnl
  • 415
  • 6
  • 21
1
vote
1 answer

mongo find inside sails native not working

I am trying to query directly on mongo using sails native adapter. I am not getting any result inspite of document present in db. Direct Waterline find functions returns documents. However I want to use native find for some other purpose and trying…
Spatil
  • 81
  • 4
1
vote
0 answers

Problems deploying SailsJs to Heroku

I am in the process of deploying a basic SailsJS application to Heroku. I have done this a few times before without any hiccups; which leads me to believe this might be a documentation or deprecation issue. When I deploy the application, this is the…
Triccum
  • 213
  • 1
  • 3
  • 10
1
vote
0 answers

Sails application cannot accessed from web browser. Connection refused

I am trying to develop a sails application that uses mongodb which works under docker. Steps that I followed is given below. Cloned application which contains mongodb connections from our git repository. Built it using following command docker…
Ashik
  • 11
  • 2
1
vote
0 answers

Deploying a sailsjs application to openshift, error with sails-mongo

I am trying to deploy my application to openshift. I followed the documentation on the sailsjs website. When I entered git push I got an error saying it failed to deploy the application so I ran rhc tail nodejs, and I got the following log. I…
Rockstar5645
  • 4,376
  • 8
  • 37
  • 62
1
vote
0 answers

Sails.js getting "Error: listen EADDRNOTAVAIL" because of setting up sails-mongo

I've got a sails.js application that I'm using sails-mongo on for my database. When I have the standard settings for sails-mongo in place, which appear like this the application boots right up: mongodb: { adapter: 'sails-mongo' } However, I've…
maudulus
  • 10,627
  • 10
  • 78
  • 117
1
vote
0 answers

is it possible to do geolocation with sails/waterline?

i am working on a geolocation based app allowing user to retrieve adverts nearby his location. i have developped a version with symfony2/mysql but now i would like to migrate the project to sails but i can't figure out how to do the equivalent of…
1
vote
1 answer

How to store a time value in MongoDB using SailsJS v0.11.3?

I'm working with SailsJS and MongoDB and I have an API that has two models and I want to store Date and Time separately but as in the official documentation said it doesn't have a typeof Time attribute, just Date and DateTime. So, I'm using DateTime…
alexventuraio
  • 8,126
  • 2
  • 30
  • 35
1
vote
1 answer

Rollback Transaction for Multiple Models in Waterline ODM in Sails (For Mongo DB )

I am using Sails and Waterline ORM with Mongo Database . I have two models User and Profile with One to One relationship. Below is the code I've written for Transaction with Rollback logic. I think there can be a much better logic than this as the…
Shiva MSK
  • 484
  • 1
  • 6
  • 16
1
vote
1 answer

Waterline takes to long to return the value

we've meet with really weird problem. Our simple queries to MongoDB takes really long time to return any document. Database is well indexed. We've made few tests and here they are: File.find({sharename: '7iPJUtP2'}, function(err, shares){ …
Roman Paraschak
  • 175
  • 1
  • 9
1
vote
1 answer

Custom Error in Sails ORM (Waterline) callback

In my user model I have something like this: register: function(data, next) { User.findOne({email:data.email}).exec(function findOneUserCB(err, user) { if (!err && user) { return next(new Error('Email already exist.')); …
Leonardo
  • 4,046
  • 5
  • 44
  • 85
1
vote
3 answers

Lifting a sails app on Heroku fails

I'm not able to lift a Sails api application in a production environment on Heroku to connect against a mongolab db. This works well when running in a local setup. The Heroku logs shows the following... ` /app/node_modules/mongodb/lib/server.js:235 …
Dilemmat_Dag
  • 383
  • 1
  • 4
  • 14
1
vote
0 answers

Result after find query in mongodb not produced

After running the code, it shows "products is not defined".Where products is supposed to be result of find() query in "products" collection in mongodb. When I run the same query outside the loop, it shows the desired result. How to solve the…
Milan Kumar
  • 77
  • 1
  • 6
1
vote
1 answer

npm install sails-mongo --save not working

I wanted to add sails-mongo in my sails project. But when I am trying to install sails-mongo (npm install sails-mongo --save). It's Showing Error : ~/newWebApp $ npm install sails-mongo --save npm ERR! Linux 3.13.0-24-generic npm ERR! argv "node"…
1
vote
1 answer

How to perform join in sails JS

I have documents of the form challenge: { "name": "challenge by abdul", "created_user_id": "1", "game_id": "123", "platform_id": "9857", "amount": 30 } game: { "_id": "auto_generated", "name": "NFS", "version":…
rash111
  • 1,307
  • 4
  • 19
  • 35