Enabling sqlite on your instance (Node.js)

Back To Blog

Perhaps you would like to have an sqlite enabled on your instance. This tutorial will show the basics of setting up an sqlite database on your opeNode instance.

This package requires to compile some binaries.

Make a new file build.sh

First, we need to create build file, build.sh as follows


echo "--- Building"
chmod 777 /tmp 

apt update && apt install make python gcc g++ -y && npm install sqlite3 --build-from-source &

Notice that we are installing packages in background mode (the apt install commands ends with &). It allows to do other installation tasks in parallel, thus speeding up the build process.

Don't require sqlite on boot

It is worth noting that the build.sh script installs the sqlite binary in background and it might take several seconds/minutes.

Other Requirements

As of today, you need enough memory to compile a binary package such as sqlite. So you need to upgrade your plan to: openode set-plan 1-GB. 1 GB is currently recommended.

Added on Wed Jun 27 2018 00:08:56 GMT+0000 (Coordinated Universal Time)