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,…
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…
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…
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…
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…
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…
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…
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…
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…
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){
…
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.'));
…
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
…
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…
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"…
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":…