nodejs tips and tricks |
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.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
|
Welcome Guest, Not a member yet? Register Sign In |