NOOB QUESTION #2: Hooks and Actions


I was reading this sweat tutorial ( and now I have a doubt.

In it, Simon uses an Action to stablish a connection with a MySQL DB and using Knex to perform all the queries/operations. But I notice that if I use this approuch I must to put my credentials in every action I make.

So, hooks.

My doubt is: how to use the credentials in a hook to make my actions do it´s magic? Using Simon’s exemple as a base to the answer will be great :slight_smile: