• Product Introduction
  • Quick Start
    • Agent Development
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Agent
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Agents
    • Overview
    • Quick Start
    • Conversation Storage
    • Observability
    • Sandbox Tool
      • Overview
      • Using the Agent Framework
      • Sandbox Atomic API
      • Network Search Tool
    • Agent Authentication
  • Models
    • Overview
    • Models and Vendors
      • Overview
      • Using Vendor Keys
        • OpenAI
        • Anthropic
        • Google AI Studio
        • DeepSeek
        • MiniMax
        • Hunyuan
        • Zhipu
        • MoonShot AI
    • FAQs
  • Storage
    • Overview
    • KV
    • Blob
  • Middleware
  • AI Tools
    • MCP
    • Skills
    • Plugin
  • Copilot
    • Overview
    • Quick Start
  • API Token
  • EdgeOne CLI
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • Adding an AI Chat Assistant to a Website
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Limits
  • Pricing
  • Contact Us
  • Release Notes

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.
If you have urgent development needs, you can contact the manager to 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 section
Click Create Record to start configuration of key-value pair data
Set 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 variable
const visitCount = await my_kv.get('visitCount');
let visitCountInt = Number(visitCount);
visitCountInt += 1;

// Modify variable
await my_kv.put('visitCount', visitCountInt.toString());

const res = JSON.stringify({
visitCount: visitCountInt,
});
For more detailed info, visit the operation document.

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

ai-agent
You can ask me like
What types of applications can I deploy?