I need to loop through an object PostIts and display the "Id", " Title" with an ejs "forEach" Loop Am using sails.js "1.2.3" and mongodb on local host, but i get error
ReferenceError : postIts is not defined at eval (eval at compile ?
Here is the…
I am working on sails application In my application I have used mysql and mongo adpater to connect with different database. Both db are hosted on somewhere on internet. Application is working fine in my local environment. I am facing issue once I…
I have this model called Services
/**
* Services.js
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes:…
Im following this tutorial to set up a simple nodejs in docker with the help of sails. So far so good, but I keep getting this one error that it cant start the app because it misses a hook('userconfig'). I cant post the image due to a reputation…
I'm currently using SailsJS framework, and i'm trying to update an array of elements using only one query in my MongoDB database.
Here is what I'm doing but records are not updated..
Incoming JSON:
{
"cars": [
{
"id":…
We've recently crossed 130K documents in one of our collection. Since then we're facing higher memory consumption issue with nodejs. We're using sails waterline.js orm for querying mongodb. So any call made to db through waterline api for example…
My sails JS application looking for mongo db(Running on docker) , though local mongo db server is available.
If docker is up with mongo db server then application connecting to docker based mongo-DB
{ name: 'MongoError',
message: 'failed to…
I am using sails 0.12.0 with sails-mongo 0.12.3. I took over an existing application from "external" developers.
I noticed that the "createdAt" date in present all mongo collections is incorrect, whereas the updatedAt date is correct. The createdAt…
I have PC running in Kiosk mode (self-service kiosk). It has weak internet connection, so I use local MongoDB server for all data. But sometimes (ex. daily) I want to send statistics and other stuff to remote database.
When I start PC, while…
I'm using Sails.js in a production environment. My site queries a MongoDB database to return an array of objects. Each object fills a news section on my site. I have success with the development environment, however, when I try in production the…
I run the command sails generate model words.common
It created in the model folder the model file Words.common.js
but I got a server error:
The Words.common model has an invalid name.
Model names must start with a letter and contain only letters,…
I have two controllers/models in my Sails project which is Clubs and Members. One club can have many members.
I try to put the id of 'Clubs' as a reference id (like a foreign key) in 'Members', so that I can retrieve the members of a club by using…
I am in the process of upgrading a NodeJS application using SailsJS and MongoDB.
I am using the 'sails-mongo' module to connect sails to mongodb.
I have both the application and database up and running in separate docker containers using…
Hello i am new to sails and would like some help with this. I am using sails with sails-mongo adapter and on my controllers when i am querying for data it returns okay and i can log the data fine but when i am trying to return the response back the…