My API uses SailsJs and MongoDb. For user creation, I am using the beforeCreate lifecycle callback to run bcrypt to hash my password field.
I encounter this wierd error, wherein if I set my encrPassword field to
{required : true}
my code stops…
Hello
any of you know how to model this document from MONGODB in sails.js?
this is a example, of the document on mongodb
{
"Iden_Codigo" : "13444",
"Iden_Aseguradora" : NumberLong(25),
"AdaptacionCanguro" : {
"AC_LugarAC" :…
In pseudo code, it'd be as so
Find all businesses where the outcodes array contains NG1
I'm having a hard time finding something that works, and waterline throws it's Invalid usage at everything I try.
Business.find({
or:{outcodes:…
After I upgrade to Sails v1, all the blueprint APIs that have the one-to-one relationship do not work when the FKs do not exist in the record. I am getting the following error message in the query response.
{
"name": "AdapterError",
…
I disable blueprints rooting ( actions: false, rest: false, shortcuts: false )
and i want when a user login i can capte user's information in the "account" view, i use mongodb database and sails-mongo as adapter
UserController.js
account :…
I have created a web application in which I'm using sails.js framework and mongodb for back-end purpose. I want to implement a cron job running at midnight of each day so that I can calculate previous day's power consumption of a property. This data…
I'm trying to configure a MongoDB connection in SailsJS through sails-mongo, but no matter how I configure it, I'm getting this error.
MongoError: no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.
Could you assist me please?
I am following this guide:
https://learn.microsoft.com/en-us/azure/app-service-web/app-service-web-nodejs-sails-cli-nodejs
In section "Connect to a database in Azure"
step 10, I am getting the error:
Error: The hook 'orm' is taking too long to load.…
I am following this guide:
https://learn.microsoft.com/en-us/azure/app-service-web/app-service-web-nodejs-sails-cli-nodejs
I am at step 6 of "Connect to a database in Azure" section
azure site appsetting add dbuser=""
I type in my…
Just want to know which method i need to override to access to this route:
/user/4/station
I override this method User.findOneByStation generated by sails, but still return the ressource, i need to make computation on this ressource before return…
In Sails I don't need UpdatedAt And createdAt column every time in find, update or in populate method.
In mongoose we can do in This way:
db.collection.find({},
{
UpdatedAt:0,
createdAt:0
})
But in sails, I don't know how to do that.
Is…
I am building a mobile app for exam practice. I need an API endpoint for the exam details and questions. I need help with structuring my data in sails.js. I have this JSON structure from firebase in mind.
The endpoint GET operation should return…
whenever trying to lifting sails it gives me the hookTimeout error every time.
While for the same configuration settings it's perfectly running on other systems.
using Ubuntu 16.0.4 and Manjaro
nodejs version 7.4.0
sails version 0.12.11
Mongodb…
I'm just trying to generate a user during the bootstrap process.
I hit his update statement and the process stops, then times out after 10 seconds with "Bootstrap is taking unusually long to execute its callback (10000 milliseconds)." Update error…
I am using sails-waterline ORM for my application.
I know how to get the selected columns in find query using 'select', but is it possible to get the same with the update query?
If yes, let me know, how can i achieve this.