Developing a new app or migrating an existing app to HarperDB without sacrificing your well-configured development IDE and local Windows environment is still simple. Windows 10 has integrated the Ubuntu Linux bash terminal, which simplifies the workflow, instead of setting up virtual machines or a cloud instance to develop for alternative architectures and operating systems.
Update Windows OS Build
The prerequisite to using the Windows Subsystem for Linux is Windows OS build version 16215.0 or higher. To make this build available, a few setup and verification steps needed.
To check your current build, press the Windows key and type: About, open the About your PC tab, and you will see a section: Windows specifications giving you the OS Build. If it is less than 16215.0, you will need to follow the posted link to configure your Windows 10 for the Windows insider program.
Activate Windows Subsystem for Linux
With the OS build updated, you can activate the Windows Subsystem for Linux. Press the Windows key and type: Windows Features, open the Turn Windows features on or off. Scroll near the bottom and check the box Windows Subsystem for Linux. Restart your computer.
Install Ubuntu and NodeJS
If your Windows OS Build version meets the minimum requirements, version 16215, or higher, AND you have activated the Windows Subsystem for Linux, you can go to the Microsoft store and download the Ubuntu Linux bash program.
Once installed, during the first run, it will ask to create a user name and password that will create when you run the app in the future. It will take a few minutes to fully install the application after you have entered the required information. Refill your water glass, and it should be ready when you return.
Logged into the Linux subsystem terminal, you can now install NodeJS.
The Ubuntu package manager does not have the HarperDB prerequisite version of NodeJS; 10.x, run the following commands:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejs
Install and Run HarperDB
The Node Package Manager (NPM) is installed auto-magically with NodeJS commands above.
HarperDB is available through NPM with the following command:
sudo npm install -g --unsafe-perm harperdb
Many things will happen here, but most importantly, when it is done and returns control, type:
IFF there is no response from the terminal after this command, you will need to give the user permissions to the HarperDB NPM file path
sudo chown -R $USER /usr/lib/node_modules/harperdb/
NOTE: It is a prerequisite you have to write permissions to the data directory, which will default to /home/ubuntu/hdb. IFF you choose to put it anywhere else, please be advised to may need to chmod the directory tree.
You can take it from here.
Check out the docs at docs.harperdb.io