Is it possible to use models defined within [app-name]/api/models outside api folder?
I have created separate folder in application root, where I placed cron job that should fill my database every hour. I would like to reuse Models defined inside…
Is there a way to perform a bulk insert via sails-mongo. So if I pass an array of documents to the model's create method, it will insert each document within that array atomically into the database?
A very simple question but I am unable to find the answer to it.
So in my Sails app I have a User model and I am trying to make a boolean field with a default value to be False.
Is there a way to specify defaults like some kind of default attribute…
I am using Waterline ORM for sails.js. limit and sort are not working when you use groupby, but are working fine when you dont do any grouping .
For example
Model.find({
groupBy:['term'],
sum:['count'],
limit:20,
sort :'count…
I am new to sails js.
I want to implement push notifications for both android and IOS in sails js .
I am using Sails js with mongodb.
can anyone help me with regarding configuration or which plugin to use to implement push notifications in sails…
The issue I have is related to the following quote from the official documentation:
Note If any connection to an adapter is used by a model, then all connections to that adapter will be loaded on sails.lift, whether or not models are actually using…
I am using SailsJS on a project and I need to use native() for certain querys. The problem I have is that I can't find a proper way to instantiate a Waterline Model Object from the mongo collection find result. I have being searching information…
I'm pretty new on Nodejs and sails.
I'm implementing a server which is similiar to Twitter. In user model, there should be 2 fields: follower and following, and the 2 fields are association of the model 'user' itself.
My question is when the model…
I get this error: a hook ('orm') failed to load when trying to lift a sails app using mongoDB. This my connections.js file:
module.exports.connections = {
mongodb: {
adapter : 'sails-mongo',
host : 'localhost',
port :…
In the documentation regarding built-in data types, it is written:
json: Any JSON-serializable value, including numbers, booleans, strings, arrays, dictionaries (plain JavaScript objects), and null.
ref: Any JavaScript value except undefined.…
After I npm installed Sails.js on Windows 10, "sails" command is not recognized.
Can someone give me a hint on what values to use in the PATH variable? As I understand it is Node.exe that runs the sails.js file. But if I try tunning "node sails.js"…
i just created a MongoDB Atlas account.
I'm using sails with waterline sails-mongo adapter
but I can't manage to connect via my app.
Everything is up to date.
I can connect to any other DB (localhost, digitalocean server, ...)
I can also connect to…
I'm on project to construct an online music site at the final stage of delivery. The MP3 audio files are openly available to download via browser inspector (absolute paths to the audio files). How can I secure them from being downloaded, yet still…
I have collection of restaurant record .Some of restaurant in this collection belongs to some group(chain type restaurant eg. KfC etc) while other doesn't has any group(Individual restaurant ,that doesn't belongs to any chain).
example :
Restaurant…