切换为 goja

This commit is contained in:
dragon
2025-11-17 17:33:40 +08:00
parent b20207de4c
commit 7778e95194
29 changed files with 634 additions and 575 deletions

10
examples/kv/index.js Normal file
View File

@@ -0,0 +1,10 @@
var db = kv.repo("self");
if(request.path == "put"){
data = db.get('key')
if(data == undefined){
db.set('key','0')
}else {
db.set('key',(parseInt(data)+1).toString())
}
}
response.write("当前存储的数值为 " + db.get('key'))