How to save shop detail in database for the first time when app installed

Hey Dev, I would like to store the shop details ( such as shop l, offline access token, etc) in the database for the first time when the merchant installed the app.
What is the best way to achieve this?

I’ve created the Shopify node app using CLI and also using REDIS for the custom session.

Thanks