Next, go ahead and install the plugins that will be needed to make working with data a breeze. Most of our application code will be going to the src directory. ![]() Proceed to pick the best options for your development setup when prompted by the installation tool, make sure you add axios, and the Pinia store while on this step.Īt the end, you should have a new Quasar application with the following directory structure. To create a new Quasar application, run the following command on your terminal: npm create quasar my-recipe-book Node >=14 (or any newer LTS Node.js version) and NPM >=6.14.12 or Yarn >= 1.21.1 installed on your machine. That’s the part we’re going to cover and extend upon in the next part in this short series. Turso, being distributed SQLite for modern applications, has also extended the portability aspect of SQLite by making it easy for you to copy your SQLite database data and upload it to Turso for global distribution. SQLite database files are backward compatible, multi platform and architecture hence easy to move around without much fuss, require no initial set up, and we can easily take them anywhere without much complications compared to other databases.ĭue to their small size, we could easily push a SQLite database file to GitHub to easily synchronize app state with others, use it in e2e tests to save on usage quotas for our deployed databases, and more. Why SQLite?īeyond the well documented reasons as to why SQLite is the most deployed and used database in the world, including the device you are using to read this, its portability is the sweet spot we’ve aimed for in this scenario. ![]() By doing that, the migration to Turso should we opt to deploy the express server somewhere, wouldn’t require any changes to be made to the source code. We’ll be using the libSQL JavaScript SDK to manage the SQLite database within the express server. And since we’ll not be able to access the SQLite file using web APIs in Quasar in this case, we’ll set up an express server through which that can be done. In this tutorial we’ll be creating a prototype for a “recipe book” mobile application using Quasar, the open source Vue.js based framework for developing responsive hybrid applications in many flavors, and SQLite. That is, unless we just use a local SQLite file, give it a schema and call it a day. It can be quite cumbersome when trying to figure out the tools to use for offline data management, and sometimes we can waste a significant amount of time setting that up. ![]() But, the same is mostly not true for the second part, data and databases. And for folks (like me) who have terrible internet connectivity, or those who travel a lot, the ability to keep on building things while offline could go a long way.īuild tools (Vite, WebPack, etc) have covered the first part involved in development on the offline aspect pretty well when it comes to managing and running your code. While working on prototypes, we normally want to deal with technology that’s easy to set up and just works. This is the first post of a two part series that demonstrates how we can create a mobile app by developing locally with a SQLite file, and then easily transfer it to Turso for production.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |