(09-20-2018, 09:25 AM)ignitedcms Wrote: Mysql findings
Holy crap guys, you don't know how complicated it is to return a full mysql result string to a view file!
Because nodejs / hapijs is asynchronous (meaning it does not necessarily execute in order e.g mysql fetches and file reading) you can't easily return the result of a mysql query save it into a variable and dump it to a view. This is a complete mind f*** for anyone not used to asynchronous coding. I will investigate this further. Woah this is difficult.
I believe the answer is to use async and await. . . Arrrgh.
Or use promises and Promise.all()