How to persist data (database)

Some applications need to store data so that it can be later loaded and reused. Hupreter supports storing data as variables so that they can be easily modified.

In this quick tutorial, we will create a counter that is incremented on each execution of the app.

First, we create the persisted variable mycounter.

Set mycounter to 0 and persist it.

Next, we load it, modify it, and save it again:

Load pst_mycounter. Increase pst_mycounter by one. Print the value of pst_mycounter. Persist pst_mycounter.

* Note that mycounter became pst_mycounter to indicate that it’s a persisted variable.

Persisting data with Hupreter
Persisting data with Hupreter (database)

Your own database

After persisting your data, all of it is accessible from your profile page. Below you can see the variable we just created, pst_mycounter, and it’s last value:

See persisted data in Hupreter
See your persisted data in Hupreter (database)

From that same page, you can also browse your tables and apps.

Now that you know how to use your personal database, you can start using them to create Apps or to build APIs.