Pages KV Integration
Makers KV storage can be used for dynamic feature enhancement of static sites, lightweight data storage, serverless application support, and data caching. Compared with traditional databases, it is more suitable for scenarios with more reads than writes, serving as a lightweight storage solution.
Getting Started
If you are using Makers KV storage for the first time, we recommend trying it with our provided template. The overall procedure consists of three steps: enabling the KV storage service, associating a Makers project with a KV namespace, and using KV storage within the project. The following sections detail the relevant information.
Enabling Makers KV Service
Go to the Makers console, click
KV Storage in the top navigation bar, and then click Apply now to start enabling the service.
To enable the KV storage service, complete the following steps:
1. Fill in application reasons - Describe the usage scenario and target based on your actual business need.
2. Submit application - After completing the application form, click the
Submit button to officially submit for review.3. Wait for approval - The system will notify related staff to evaluate and handle it.
4. Create Namespace
Service activated, click the
Create Namespace option in the console.Assign a name with business significance to the namespace
Click to confirm completion of creation
5. Initialize KV storage
Navigate to the
Data Management sectionClick
Create Record to start configuration of key-value pair dataSet the key name (Key) and value (Value) based on business requirements
Complete all required fields and submit
Note: After KV storage initialization is completed, data read and write operations can be performed via API. It is advisable to plan the key name naming specification and data storage structure in advance.
Creating a Makers Project and Associating KV Storage
1. Deploying the Makers KV Template
On the Makers
Project page in the console, click Create project -> Start from template. In the left sidebar, locate Database -> Makers KV and choose it. Create functions for the KV template.

Open the template, click
Create on the deployment page. Deployment usually takes about 20 seconds. Before deployment, if not associated with an online Git, you need to complete Git authorization (supports Github/Gitee).2. Binding a Namespace to a Makers Project
After deployment, click
KV Storage in the left navigation bar, then click Bind Namespace on the page.
In the Bind Namespace window, select the
Namespace created in the KV service applied for earlier, then fill in Variable Name. Variable Name will be used in code to access variables in the Namespace.3. Implementing KV Operations in Code
For specific usage, refer to the template code in Makers functions for KV, specifically
/functions/visit/index.js. Below is a simple request access example.// Get variableconst visitCount = await my_kv.get('visitCount');let visitCountInt = Number(visitCount);visitCountInt += 1;// Modify variableawait my_kv.put('visitCount', visitCountInt.toString());const res = JSON.stringify({visitCount: visitCountInt,});
Local Development
EdgeOne CLI provides developers with a powerful command line interface tool that can significantly improve your development efficiency and code quality. With this tool, you can:
Perform edge computing operations intuitively and simplify the configuration process
Efficiently debug code: detect and optimize code performance in real time in the local environment
Online data sync: easily import production environment data to the local development environment for true and reliable testing
Precise problem localization: quickly identify and address performance bottlenecks in edge computing
Whether you are an experienced developer or a beginner just exposed to edge computing, EdgeOne CLI can help you build more stable and efficient applications. For more information on advanced functions and best practices, please visit our operation documentation.
More Related Content
Learn about EdgeOne CLI usage: EdgeOne CLI instructions
Learn about KV Storage: KV Storage operation instructions
Learn more about edge function usage: Edge function operation instructions
