Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:32
    karimerrahli starred balderdashy/sails
  • Dec 04 18:04
    deweyspencer starred balderdashy/sails
  • Dec 04 13:40
    sorsaffari commented #4562
  • Dec 03 04:46
    tomoya-sforzando starred balderdashy/sails
  • Dec 03 01:22
    sailsbot commented #7079
  • Dec 03 01:22
    sailsbot unlabeled #7079
  • Dec 03 01:22
    AlanConstantino edited #7079
  • Dec 03 01:19
    sailsbot commented #7079
  • Dec 03 01:19
    sailsbot labeled #7079
  • Dec 03 01:19
    AlanConstantino opened #7079
  • Dec 03 01:01
    bahasalien starred balderdashy/sails
  • Dec 02 20:43
    dantes47 starred balderdashy/sails
  • Dec 02 19:53
    sailsbot commented #7078
  • Dec 02 19:53
    eashaw review_requested #7078
  • Dec 02 19:53
    eashaw opened #7078
  • Dec 02 19:50

    eashaw on model-settings-docs

    Added more information about th… (compare)

  • Dec 02 19:35
    sailsbot unlabeled #7077
  • Dec 02 19:35
    Fjohn666 commented #7077
  • Dec 02 18:57
    eashaw labeled #6911
Jaki Chavez
@angjaki_gitlab
05:09:34 app-0 A socket is being allowed to connect, but the session could not be loaded. Will create an empty, one-time session to use for the life of the socket connection. Details:
05:09:34 app-0 Error: Session could not be loaded
05:09:34 app-0 at _createError (/tmp/node_modules/sails/lib/hooks/session/index.js:31:19)
05:09:34 app-0 at Immediate.<anonymous> (/tmp/node_modules/sails/lib/hooks/session/index.js:34:11)
05:09:34 app-0 at runCallback (timers.js:653:20)
05:09:34 app-0 at tryOnImmediate (timers.js:622:5)
05:09:34 app-0 at processImmediate [as _immediateCallback] (timers.js:594:5).
Martin Barilík
@martinbarilik
Hi, i am trying to set up socket.io-redis host for different envs (prod, dev and qa), but i am unablle to find any useful info. Where should i put those urls specific to an env ?
2 replies
Mike DeVita
@mikedevita
hello, does anyone have a working example w/ passport that I can review?
Andy Gnz
@Gonzov
Hey guys, so I added my Stripe keys. My question how do I charge my customer who added their card? I was trying to find in docs but I couldn't.
Abhishek Gupta
@tikur1
Hi, when someone calls http://localhost:3000/api then the base URL hits(http://localost:1337). is it anyway how can I achieve this
MaheshSreenath.V.M
@MaheshSreenath_twitter
Any one can help with angular 10 and sails socket connection?
any link or documentation would be really helpful i was able to connect to sails using sails.io.js but broadcasting messages is not working
Noitidart
@Noitidart

has anyone used env var to set password for sockets? doing the following gives me error -

docker run -p 1337:1337 --name effendi ghcr.io/noitidart/effendi:latest -e sails_sockets__pass='myFakePassword'
docker run -p 1337:1337 --name effendi ghcr.io/noitidart/effendi:latest -e sails_sockets__pass="myFakePassword"
docker run -p 1337:1337 --name effendi ghcr.io/noitidart/effendi:latest -e sails_sockets__pass=myFakePassword

ReferenceError: myFakePassword is not defined

Lukas Bahr
@lukasbahr
Hey guys, I need some help concerning sending mails. Is sendgrid required to send mails or can we use the mail address from the webhost? #noidea
Noitidart
@Noitidart
Anyone seen this error when trying to use a managed hosted database? I deployed using same techniques before and didnt get this error. But now I am:
Troubleshooting tips:

 -> Is your Postgresql configuration correct?  Maybe your `poolSize` configuration is set too high? e.g. If your Postgresql database only supports 20 concurrent connections, you should make sure you have your `poolSize` set as something < 20 (see http://stackoverflow.com/a/27387928/486547). The default `poolSize` is 10. To override default settings, specify the desired properties on the relevant Postgresql "connection" config object where the host/port/database/etc. are configured. If you're using Sails, this is generally located in `config/datastores.js`, or wherever your environment-specific database configuration is set.

 -> Maybe your `poolSize` configuration is set too high? e.g. If your Postgresql database only supports 20 concurrent connections, you should make sure you have your `poolSize` set as something < 20 (see http://stackoverflow.com/a/27387928/486547). The default `poolSize` is 10.

 -> Do you have multiple Sails instances sharing the same Postgresql database? Each Sails instance may use up to the configured `poolSize` # of connections. Assuming all of the Sails instances are just copies of one another (a reasonable best practice) we can calculate the actual # of Postgresql connections used (C) by multiplying the configured `poolSize` (P) by the number of Sails instances (N). If the actual number of connections (C) exceeds the total # of **AVAILABLE** connections to your Postgresql database (V), then you have problems.  If this applies to you, try reducing your `poolSize` configuration. A reasonable `poolSize` setting would be V/N.

 -> Are you using an SSL-enabled Postgresql host like Heroku? Make sure to set `ssl` to `true` (see http://stackoverflow.com/a/22177218/486547)


error: Sending 500 ("Server Error") response: 
 AdapterError: Unexpected error from database adapter: `create` failed ("badConnection").  A connection either could not be obtained or there was an error using the connection.
Additional data:

{
  error: Error: self signed certificate in certificate chain
      at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
      at TLSSocket.emit (events.js:315:20)
      at TLSSocket._finishInit (_tls_wrap.js:932:8)
      at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) {
    code: 'SELF_SIGNED_CERT_IN_CHAIN'
  },
8 replies
skyfall1970
@skyfall1970
when CSRF is enable(SocketServer),another project that how to pass csrf Token in Socket.io(SocketClient)?
Martin Barilík
@martinbarilik
Hi there, any idea why am i getting WebSocket connection to 'ws://{server-domain}/socket.io/?sails_io_sdk_version=1.1.0&sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400 ? On devvelopment everything works just fine
usinng sails 0.12.x
Martin Barilík
@martinbarilik
Still finghting with the error. Do i need to precompile or allow socket.io route ?
Or maybe this is an nginx error ? I found some articlles about it but not sure if i should mess with its config
When i copy-paste the link into browser i get "This site can’t be reached" shouldn't it at least be reachable but not allowing to connect when it is a port :80 ?
Martin Barilík
@martinbarilik
Nevermind, it was the nginx setting i was missing
Martin Barilík
@martinbarilik
Any idea why am i not notified via socket when new region is created? I am subscribed with Region.subscribe(req, _.map(await Region.find({}), 'id')); i am not getting notifactions even if i update it afterwards
it's like autoWatch is not working in 0.12
Martin Barilík
@martinbarilik
i need to add Region.watch(req) under sub line
Stas Arshanski
@stuk88
anybody had luck connecting to atlas cloud with sails 0.12?
Robertino Vasilescu
@Rho-bur
Hi,
I have issues trying to connect to Azure MySQL Database because the user name format is 'user@servername.com' and this breaks the datastore connection URL; the package i use is sails-mysql@1.0.1 which hasn't been updated since long; tried with individual settings and same problem.
I've read the sails-mysql@1.0.1 uses a version of mysql pacjage not compatible with Azure.
Anyone aware of a way to connect to Azure with an URL connection string (or individual settings)?
Robertino Vasilescu
@Rho-bur
Replying to my own question: I managed to connect using @mikermcneil sails-sql package although it has a warning to not be used in production; I guess i'll have to dig what could go wrong but for the moment it works.
Noitidart
@Noitidart
@Rho-bur i think i read in gitter somewhere that sails-sql was tried heavily and true for MySql
Robertino Vasilescu
@Rho-bur
@Noitidart Thanks! Do you mean tried and running OK in production? I am basically using it to connect, run basic Waterline queries and mostly with raw queries.
Noitidart
@Noitidart
Yea i remember Mike made a comment when he announced that package in gitter that it was tested heavily with MySQL in prod.
Robertino Vasilescu
@Rho-bur
Hello everyone!
Any pointer to a good CLI tool for profiling a sails api?
Some mysql queries take 28000 ms (from API to another VM with Mysql server) and there is nothing wrong with the VM communication or the Mysql response (I've ran same queries from console and they are fast).
I need to find out where the bottleneck is.
Kontributer
@Kontributer
Never use MySQL. Stick to Postgres
at3s
@_at3s_twitter
hello, can anyone suggest for me a course to learn sails
Robertino Vasilescu
@Rho-bur
@Kontributer appreciate the advice but why is that?
Kontributer
@Kontributer

Many reasons, but mostly because it’s the best open source software when it comes to ACID compliance, redundancy, replication, scalability, performance, etc. Uber shifted from Postgres to MySQL in 2016, which brought a lot of attention to scrutinizing the differences. In the end it was found that Uber’s claims were on misinformation and the parts they were right about were small and now part of Postgres. Basically for ISO-SQL RDBMSs, it’s the best bang for the buck. With its JSON adoption it’s probably preferred to to NoSQL DBs now too.

If you want to pay for SQL Server, DB2, or Oracle; they might offer some gains, but it’s probably not worth it.

Robertino Vasilescu
@Rho-bur
@Kontributer Thank you! I appreciate the details; I'll look into it.
Robertino Vasilescu
@Rho-bur
Hello!
Seems I have some trouble on trying to copy the images directory from assets/styles (relative path: assets/styles/images) to .tmp/min.
I have added this { expand: true, cwd: './assets/', src: ['styles/images'], dest: '.tmp/public/min/' }
to tasks/register/ buildProd.js in the build:{files: [ ]}
but it doesn't copy it.
Any idea why?
Chris Smith
@ChrisSmith5
Has anyone had success connecting to an Azure Cosmos DB (Mongo API)?
I get the error: Error: Consistency violation: Unexpected error creating db connection manager
MongoError: connection 0 to xxx.mongo.cosmos.azure.com:10255 timed out
I can connect to the DB no problem writing plain NodeJS code but when I try to use the sails-mongo adapter I get errors
Chris Smith
@ChrisSmith5
[SOLVED] for anyone attempting to connect to Azure Cosmos DB Mongo API, you must include ssl: true
Kontributer
@Kontributer
Just curious. Is Treeline dead? It’s been a few years and never received my beta 🤣
Robertino Vasilescu
@Rho-bur
correction to my post above; the extra files code was added in tasks/config/copy.js which is in turn called by the buildProd.js.
Sidhi
@sidhi-sid
Hey, i'm struggling with the through association. How is it used ?
lyrakerman
@lyrakerman_twitter

Hello, I'm trying to connect to my remote mongodb, and this is what I did:
1) In models.js I edited the id as: id: { type: 'string', columnName: '_id' },
and
2) Inside datastore.js I edited:

adapter: 'sails-mongo',
url: 'mongodb://user:*@testingcluster.pipoz.gcp.mongodb.net/articlebase?retryWrites=true&w=majority',

Now it can't connect to my remote mongodb, plz help

Amir Alcocer
@amir-alcocer-dacodes_gitlab
Hello everybody, create().populate() works?
@lyrakerman_twitter , i think you should put the port number if it is not the port # 80
also, i am assuming your user on the database is "user:*"
Rick Bonglae Kim
@RickBonglaeKim
hello
Rick Bonglae Kim
@RickBonglaeKim

I have problem with production environment.
when I lift the sails app on prod option, the css file 'production.min.css' made by grunt does not have anything.
I checked the file in web broswer but There was nothing...

It was not happened when I tried on dev environment.

please let me know, If someone know about this issue.

Noitidart
@Noitidart
Rick make a new sails project and then compare differences. It should work fine. There can be tons of things wrong we don't know.
TIFF-1000
@tiffleek_twitter
Hi, can anyone recommend a good tutorial that has data flowing around? I'm being a bit simple and not managing to work out how I go from my created model to ie /my-model/view/<newmodelid>
ie I'm adding a new record to the db in the function of my controller, but I can't see how to pass the new ID to the success: exit view. I suspect I'm doing something bckwards..
TIFF-1000
@tiffleek_twitter
Is this the only Sails community??
Hernán Silva
@hachesilva

@tiffleek_twitter fetch the record after create ( var myRecord = Record.create(...).fetch() ) then pass the entire record or any part of it to the view via return (return myRecord.id; ), it will be available in your view

if you want to reference it with another name, then return an object which key is your new var (return { 'myVar': myRecord }) it will be available in your view as "myVar"

Kontributer
@Kontributer
@tiffleek_twitter have you tried the class on Platzi?