by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 04:04
    pankajiiitm starred balderdashy/sails
  • Jul 10 22:54
    clsource starred balderdashy/waterline
  • Jul 10 15:13
    sojohnnysaid starred balderdashy/sails
  • Jul 10 03:50
    AtlasRW starred balderdashy/sails
  • Jul 10 01:34
    justinforlenza starred balderdashy/sails
  • Jul 09 10:44
    thiruopti edited #7019
  • Jul 09 10:43
    sailsbot commented #7019
  • Jul 09 10:43
    thiruopti opened #7019
  • Jul 08 21:36
    mikermcneil commented #7018
  • Jul 08 15:52
    johnabrams7 labeled #4590
  • Jul 08 11:18
    sailsbot unlabeled #4590
  • Jul 08 11:18
    Bhavykapadiya commented #4590
  • Jul 08 08:00
    sailsbot unlabeled #7018
  • Jul 08 08:00
    NachtRitter commented #7018
  • Jul 08 06:30
  • Jul 07 23:53
    mikermcneil commented #7018
  • Jul 07 17:12
    johnabrams7 labeled #6998
  • Jul 07 17:09
    johnabrams7 labeled #6999
  • Jul 07 17:09
    johnabrams7 labeled #6999
  • Jul 07 17:06
    johnabrams7 labeled #7006
xPtrrj
@xPtrrj
Hey guys, I'm new with sailsjs and in nodejs in particular. I'm having a hard time understanding sails. So if I understand it right, is sailsjs a full-stack framework of vue + nodejs/expressjs?
6 replies
Henrique
@jhenriquemc
Hi folks! How I can catch all exceptions, and transforming in a default error response? I want catch "some error exception" and make a json response like that: {statusCode: 500, error: 'Some error...'}. I want to do that, without catch the exceptions in each action.
12 replies
Noitidart
@Noitidart

I need to run some native queries before the orm loads up, is there a way i can do this? example query:

await sails.getDatastore().sendNativeQuery(`
        CREATE EXTENSION IF NOT EXISTS citext;
      `);

putting it in bootstrap is too late, orm fails to load saying:

error: A hook (`orm`) failed to load!
error: 
error: error: type "citext" does not exist
    at Connection.parseE (/Users/epyon/Documents/The-Masjid-App-Web/node_modules/pg/lib/connection.js:569:11)
    at Connection.parseMessage (/Users/epyon/Documents/The-Masjid-App-Web/node_modules/pg/lib/connection.js:396:17)
Noitidart
@Noitidart
Any lifecycle callbacks like before table is created? https://sailsjs.com/documentation/concepts/models-and-orm/lifecycle-callbacks
6 replies
Noitidart
@Noitidart
Has anyone setup datadog with sails.js - i was thinking of trying it out
StephenS
@S-Stephen
Hi, Does anyone happen to know whether I can configure sails models to query databases views? I only need to utilize read queries.
2 replies
JohanAlbrectsen
@JohanAlbrectsen
Hi, when I have a question about authentication. When I login with an account on device 1, it all works fine, but when I login with the same account on device 2, device 1 logs out. I use Mysql to store users and sessions. Any help is greatly appreciated!
2 replies
Muhammad Inaam Munir
@Muhammadinaam
sails.log.error(error) not working in sails run <some-script>. How can I log errors in sails shell scripts?
3 replies
Sven Varkel
@svenvarkel
Hi! Long time, no see :) Is anyone using skipper-gridfs to upload data to MongoDB gridfs from file uploads? Something has happened to the library recently as it stopped working all of a sudden. Any ideas?
JohanAlbrectsen
@JohanAlbrectsen
Screenshot 2020-07-07 at 13.49.03.png
Chu Quang Khanh
@askeyh3t_gitlab
Mình đang bị vấn đề cors. Mình đã config các kiểu trong security . Nhưng vẫn bị lỗi như vậy. Ai giúp mình với
1 reply
Chu Quang Khanh
@askeyh3t_gitlab
image.png
Mark HM
@markhm
Screenshot 2020-07-07 at 21.14.54.png
2 replies
Sven Varkel
@svenvarkel
Does Heroku load balancer support TCP connection?
Websockets require TCP, not just HTTP
Mark HM
@markhm
Thanks @svenvarkel. This might indeed explain my problem -> https://stackoverflow.com/a/60774741.
Sven Varkel
@svenvarkel
no worries
I've wrestled with it in AWS a few years ago. It was exactly the problem there. I had to reconfigure load balancer :)
Mark HM
@markhm
I am trying to undertstand my best options for deploying atm, so this is helpful input. 👍🏻
Sven Varkel
@svenvarkel
I'm myself wrestling with broken skipper-gridfs library. it just stopped working and doesn't upload anything to mongodb gridfs :)
Mark HM
@markhm
I have no experience with uploading files to sails, unfortunately.
Have you perhaps ever seen an example of a https://bootstrap-vue.org/ frontend on Sails…? I am trying to find an example that uses a modern approach with action2s. I need some help understanding how to set it up.
Sven Varkel
@svenvarkel
I'm using SvelteJS frontend. SailsJS only for the REST API
I've been using action2 for several years now, it's really straightforward
however, I don't use view's or templates or anything. SailsJS is pure API and a separate web app is the client :)
Mark HM
@markhm
Yes, in general it works quite well for me too. But I don’t understand how to add bootstrap-vue to the frontend. I started using Sails thinking that would bring me all I needed, not realising that this also meant having to learn Vue, Bootstrap and some other things. :)
I had never heard of SvelteJS. Will take a look.
Sven Varkel
@svenvarkel
Svelte is a bit different. It's a compiler. It pre-compiles your app so it's much smaller and works much faster in the browser
Mark HM
@markhm
For which kind of apps would you recommend it…?
NeoNexus DeMortis
@neonexus
@markhm While it is using React, and not Vue, I would imagine you should get a couple good ideas from sails-react-bootstrap-webpack
Sven Varkel
@svenvarkel
huh, dunno actually. I guess it depends on a lot of things like business requirements but also developer skills and availability
3 replies
Mark HM
@markhm
Thanks @neonexus. I had already taken a brief look, but was unable to quickly start your example, since it uses mysql by default. I need to spend some more time to get it up and running.
NeoNexus DeMortis
@neonexus
Oh, just remove / change the datastore back to sails-disk
Then comment out / remove the contents from bootstrap.js
Mark HM
@markhm
Yes, will give it another try tomorrow and will let you know. Thanks again for mentioning it.
NeoNexus DeMortis
@neonexus
@markhm I'm glad I brought it up; gives me inspiration to make the bootstrap.js schema validation configurable...
Shashan Sooriyahetti
@OnbitShashan

hey anyone here knows why is this keep happening,

message=Unexpected error from database adapter: connection 5 to xxx.xx.xx.xx:27017 timed out, stack=AdapterError: Unexpected error from database adapter: connection 5 to xxx.xx.xx.xx:27017 timed out

at /home/projects/ideadroid/Appmaker-Backend/node_modules/parley/lib/private/Deferred.js:303:7
at /home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/node_modules/machine/lib/private/help-build-machine.js:954:24
at Function.handlerCbs.success (/home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/node_modules/machine/lib/private/help-build-machine.js:814:26)
at Object.fn (/home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/lib/private/machines/release-connection.js:77:18)
at wrapper (/home/projects/ideadroid/Appmaker-Backend/node_modules/@sailshq/lodash/lib/index.js:3282:19)
at Deferred.parley.retry [as _handleExec] (/home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/node_modules/machine/lib/private/help-build-machine.js:1076:19)
at Deferred.exec (/home/projects/ideadroid/Appmaker-Backend/node_modules/parley/lib/private/Deferred.js:286:10)
at Deferred.switch (/home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/node_modules/machine/lib/private/help-build-machine.js:1469:16)
at /home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/lib/private/do-with-connection.js:242:92
at /home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/lib/private/do-with-connection.js:123:18
at Object.success (/home/projects/ideadroid/Appmaker-Backend/node_modules/sails-mongo/lib/private/build-std-adapter-method.js:61:47), name=AdapterError, adapterMethodName=find, modelIdentity=article, name=MongoError, _originalStack=MongoError: connection 5 to xxx.xx.xx.xx:27017 timed out

--

Mark HM
@markhm
I have a parasails/Vue component with props that update automatically ( {{hour}}, {{minute}} ) when they are changed from outside of this component. That works fine. Question is now: how can trigger I re-initialization of the component on a change? These props define which part of the data needs to be processed (which is done in the initialization method), so when they change, initialization needs to happen again. 🙏🏻
Noitidart
@Noitidart
has anyone done an endpoint to create and export an excel file? just curiours about your experience, any recommendations you had. i was going to be doing this soon
RSA
@aflatoon2874
@Noitidart - There is a npm package named xlsx. You can explore it for your use case. It is good
Noitidart
@Noitidart
Thanks @aflatoon2874 i used it, it works great!
Noitidart
@Noitidart

has anyone used mailgun and ever got this:

4.7.0 [TSS04] Messages from IP_HERE temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html

I don't know how to resolve this and customers complaining they arent getting qr code
Jarrod
@nahanil
Mailgun uses shared IP addresses & someone else is probably sending out spam. There's some blacklist checks online if you know the originating IP - complaining to mailgun generally gets you switched to a different outbound IP
@noitidart
Noitidart
@Noitidart
oooo thank you so much @nahanil i will escalate that!
Mark Brown
@markwbrown
I'm getting an error on sails lift : 'Error defining hook: config is a reserved property and cannot be used as a custom hook method.');
9 replies
Mark Brown
@markwbrown
anybody know where this is coming from?
Mark HM
@markhm
Hi. I've just patched a third-party component that my application uses (it is defined in my application's package.json and installed in node_modules).
I would like to understand my options to ensure my application uses the patched component when it is deployed from GitHub.
  • Can I somehow deliver my application with the patched component, rather than the one original one...?
  • Can I release the patched version to npm myself and refer to the increased version number...?
Jarrod
@nahanil
@markhm You can specify a git repo as a dependency in your package.json or publish a fork as say @markhm/fancymodule
1 reply