Shopify node react installed app data store location

Solved
RobertDev
Excursionist
14 2 2

Hello,

I am using https://github.com/Shopify/shopify-demo-app-node-react and I was wondering where is the install data persisted in the app? or is It even necessary?

Regards,

Robert

 

Accepted Solution (1)

Accepted Solutions
Michal17
Shopify Partner
835 74 155

This is an accepted solution.

Hi @RobertDev 

Hope you're having a great day!

I was aware of the fact that databases might be needed but I am not sure of the fact that they are required.

Databases are not required. It all depends on your needs and what you want to design. You may want to add a database to your app or depending on what data you are storing you could use metafields

Merchants and other apps can retrieve and edit the data that's stored in metafields from the Shopify admin. If you want to use metafields to store data, but you don't want merchants or other apps to access that data, then you can use private metafields.

Will the node-react app keep track of active installation without the database? or is it stored in memory and will be lost when app restarts (doesn't seem so from what I checked).

If you want to store data, like shop origin or accessToken and other custom data, you should use a custom database. 

To summarizing, Your app is responsible for storing its own information.

If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.

View solution in original post

Replies 4 (4)
Michal17
Shopify Partner
835 74 155

Hi @RobertDev 

Hope you're having a great day!

Useful resources:

How to store app configuration values?

RobertDev
Excursionist
14 2 2

Hello,

 

Thank you for your response, but that does not answer my question. I was aware of the fact that databases might be needed but I am not sure of the fact that they are required.

Will the node-react app keep track of active installation without the database? or is it stored in memory and will be lost when app restarts (doesn't seem so from what I checked).

 

Regards,

Robert

Michal17
Shopify Partner
835 74 155

This is an accepted solution.

Hi @RobertDev 

Hope you're having a great day!

I was aware of the fact that databases might be needed but I am not sure of the fact that they are required.

Databases are not required. It all depends on your needs and what you want to design. You may want to add a database to your app or depending on what data you are storing you could use metafields

Merchants and other apps can retrieve and edit the data that's stored in metafields from the Shopify admin. If you want to use metafields to store data, but you don't want merchants or other apps to access that data, then you can use private metafields.

Will the node-react app keep track of active installation without the database? or is it stored in memory and will be lost when app restarts (doesn't seem so from what I checked).

If you want to store data, like shop origin or accessToken and other custom data, you should use a custom database. 

To summarizing, Your app is responsible for storing its own information.

If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.

RobertDev
Excursionist
14 2 2

Hello,

After a couple of threads read I came to the conclusion that a database will be required to store the initial installation shop and accessToken.

Other data related to my admin backend I store in private metafields as you outlined in your response!

Now I am at the part of storing images with StagedUploadsCreate mutation but I get a "StagedUploadsCreate access denied" for some odd reason. To bypass this I will upload the image as a theme asset I think and it will be available for the current active theme unfortunately... because StagedUploadsCreate is denied for some reason.😞😞

 

Thank you for your time and effort in responding to my question!

Regards,

Robert