Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Websirs
@websirs
console.log(agent); == 0
console.log(agentsList.rows); = [ RowDataPacket {
id: 13,
fullName: 'Kurt B',
emailAddress: 'agent3@websirs.com' },
RowDataPacket {
id: 14,
fullName: 'Sandy L',
emailAddress: 'agent4@websirs.com' } ]
i am thinking now the for loop is wrong
it must be..
Websirs
@websirs

if use .each or .foreach on the agentsList.rows i get an error:

SyntaxError: await is only valid in async function

we use await in the loop to send an email to each result item

GOT IT
for (agent in agentsList.rows) {
should be
for(agent of agentsList.rows) {
too much PHP :P
Jarrod
@nahanil
@websirs good catch!
Websirs
@websirs
thank you!
thanks for helping look into it
Ankit Bhanderi
@baj9032

Hi,

I am working on dockerizing sails application now everything works okay but now I need to sertup ssl with docker in sails application but I am not sure which steps I need to follow can anyone help me?

Robertino Vasilescu
@Rho-bur
Hi, could anyone successfully access a sails route from within an android app? I keep getting Forbidden. Cors and csrf are set to false for the mobile routes.
Websirs
@websirs
hi, there seems to be no documentation on Cloud SDK?
what i am trying to do is get the returned result
await Cloud.doThisTask.with({ id: theID });
Jarrod
@nahanil
@websirs Have you looked at "assets/dependencies/cloud.js"? There's quite a few useful comments near the top
Websirs
@websirs
cool thank you!

here is how to do it:

var result = await Cloud.doThisTask.with({ id: theID });

lol.
it return back into result
Websirs
@websirs

hmm you know how on layout.ejs it loads all the *.page.js files

there must be a way to make it only load the page.js file of the page its on

and it can be done manually by adding an if statement for each page
but there must be a better way?
this is on the sails js web app template installation
which is super -- saves a lot of time!
Jarrod
@nahanil
Waiting for @Noitidart to mention webpack 🙃
@websirs running in "production mode" should at least smush all your JS files into one and minify them
Noitidart
@Noitidart
Hahahahah @nahanil
Yeah @websirs it's called code splitting. From the following article, install webpack from step 1, and then copy and paste the code from step 4, in the “Let’s begin…” section. https://medium.com/@Noitidart/adding-code-split-react-frontend-without-losing-vue-to-sails-1-x-app-5642131ed8a0
Noitidart
@Noitidart

Hi,

I am working on dockerizing sails application now everything works okay but now I need to sertup ssl with docker in sails application but I am not sure which steps I need to follow can anyone help me?

@baj9032 can you chare what you have done? I am also trying to do same thing. Especially the https part. I hear it has to do with certbot.

Jarrod
@nahanil
@Noitidart I'm digging this guide at the moment https://dockerswarm.rocks/
If you install traefik (or some other thingy like nginx) you can probably get SSL magically working
I got something up and running the last few days that seems to do the business :D
@baj9032 that link might be worth a read - hard to say without knowing what you've done so far ey
Noitidart
@Noitidart
Thanks man!
Noitidart
@Noitidart
On create of an entity, in mongo, if the client is sending their own id, say a uuid, whats the convention? Create a column called clientId? Or do some stuff to tell mongo to use this id?
Any docs on sails/waterline using custom id?
Noitidart
@Noitidart
Is it possible to get all socket room names?
sails.io.of('/').adapter.clientRooms(sails.sockets.id) gives us all client rooms this socket id is in. but i was hoping to get all
Jarrod
@nahanil
@Noitidart sails.io.of('/').adapter.rooms ?
Noitidart
@Noitidart
Oh thanks I is that take just a single callback?
I don't have anything setup to test but will try that, was just doing some architecture right now
Jarrod
@nahanil
Seems like a property
Noitidart
@Noitidart
Oh no way
Thanks man!
Jarrod
@nahanil
yeah - dunno if it's cluster aware