NCache for Data Caching in Node.js
NCache provides a sample application for Node.js on GitHub. This section will guide you through setting up and using this sample application.
Important
Before getting started with NCache in Node.js, take the following prerequisites under consideration:
- Node.js version 14.15.3 or above is installed.
- JDK 11 is installed.
- The Environment Variable for JAVA_HOME is set.
NCache Demonstration using Sample Application
Follow the steps mentioned here to see how NCache is used to perform various operations on your Node.js application's data.
Step 1: Download Sample from GitHub
Go to the NCache repository on GitHub and download the entire repository or the sample you are interested in.
Step 2: Launch the Project
Launch your Node.js sample application in a Node.js IDE of your choice. For example, Visual Studio Code.
Step 3: Configure Settings
After launching the project, locate and open the app-config.json file where you have to change the cacheName
to the cache you created before.
Step 4: Build the Project and Use Sample
After configuring the cache settings, build the sample application for further use.