{"id":215374,"date":"2020-12-06T00:44:08","date_gmt":"2020-12-05T16:44:08","guid":{"rendered":"http:\/\/4563.org\/?p=215374"},"modified":"2020-12-06T00:44:08","modified_gmt":"2020-12-05T16:44:08","slug":"%e3%80%90%e5%bc%80%e6%ba%90%e3%80%91cf-worker-kv-%e7%9f%ad%e9%93%be%e6%8e%a5-%e7%9f%ad%e7%bd%91%e5%9d%80%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=215374","title":{"rendered":"\u3010\u5f00\u6e90\u3011CF Worker KV \u77ed\u94fe\u63a5\/\u77ed\u7f51\u5740\u7a0b\u5e8f"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>tomx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u3010\u5f00\u6e90\u3011CF Worker KV \u77ed\u94fe\u63a5\/\u77ed\u7f51\u5740\u7a0b\u5e8f<\/h3>\n<p>  \t\t\u5f88\u591a\u65f6\u5019\u7f51\u5740\u8fc7\u957f\u4e0d\u5229\u4e8e\u5206\u4eab\uff0c\u5c06\u957f\u7f51\u5740\u8f6c\u6362\u77ed\u7f51\u5740\/\u77ed\u94fe\u63a5\uff0c\u7f29\u77ed\u5185\u5bb9\u957f\u5ea6\uff0c\u4f1a\u4f7f\u5f97\u5206\u4eab\u66f4\u52a0\u65b9\u4fbf\u3002<br \/>  \u501f\u52a9\u514d\u8d39\u7684Cloudflare Worker\u548c\u524d\u4e0d\u4e45\u65b0\u6dfb\u52a0\u7684kv\u514d\u8d39\u989d\u5ea6\u53ef\u4ee5\u642d\u5efa\u5c5e\u4e8e\u6211\u4eec\u81ea\u5df1\u7684\u957f\u7f51\u5740\u8f6c\u6362\u77ed\u7f51\u5740\u7a0b\u5e8f<\/p>\n<p>  \u9879\u76ee\u5f00\u6e90\u5730\u5740\uff1ahttt\u5220\u9664ps:\/\/github.com\/xyTom\/Url-Shorten-Worker\u77ed\u7f51\u5740\uff1ahttt\u5220\u9664ps:\/\/5it.me\/code<br \/>  \uff08\u4f5c\u4e3a\u4e00\u4e2a\u65b0\u4eba\uff0c\u9ebb\u70e6\u5404\u4f4d\u5927\u4f6c\u7ed9\u4e2aStar\uff0c\u9f13\u52b1\u4e00\u4e0b\u6211\u8fd9\u4e2a\u65b0\u4eba\u5f00\u53d1\u8005\uff0c\u672a\u6765\u6211\u4f1a\u52aa\u529b\u5f00\u53d1\u66f4\u591a\u5f00\u6e90\u7a0b\u5e8f\uff09<\/p>\n<p>  Demo\uff1ahtt\u5220\u9664ps:\/\/5it.me<br \/>  \u6ce8\u610f\uff1aKV\u6709\u514d\u8d39\u989d\u5ea6\u9650\u5236\uff0c\u6bcf\u5929\u53ea\u80fd\u51991000\u6b21<\/p>\n<p>  \u642d\u5efa\u6559\u7a0b\uff1a<\/p>\n<p>  \u9996\u5148\u53bbhttt\u5220\u9664ps:\/\/workers.cloudflare.com\/\u6ce8\u518c\u4e00\u4e2a\u8d26\u53f7<\/p>\n<p>  \u53bbWorkers KV\u4e2d\u521b\u5efa\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4<\/p>\n<p>  https:\/\/cdn.jsdelivr.net\/npm\/imst@0.0.4\/20201205232805.png<\/p>\n<p>  \u53bbWorker\u7684Settings\u9009\u9009\u9879\u5361\u4e2d\u7ed1\u5b9aKV Namespace<\/p>\n<p>  https:\/\/cdn.jsdelivr.net\/npm\/imst@0.0.4\/20201205232536.png<\/p>\n<p>  \u5176\u4e2dVariable name\u586b\u5199`LINKS`, KV namespace\u586b\u5199\u4f60\u521a\u521a\u521b\u5efa\u7684\u547d\u540d\u7a7a\u95f4<\/p>\n<p>  https:\/\/cdn.jsdelivr.net\/npm\/imst@0.0.4\/20201205232704.png<\/p>\n<p>  \u590d\u5236\u672c\u9879\u76ee\u4e2d\u7684`index.js`\u7684\u4ee3\u7801\u5230Cloudlare Worker <\/p>\n<p>  \u70b9\u51fbSave and Deploy<\/p>\n<p>  \u6700\u540e\uff0c\u65b0\u4eba\u7b2c\u4e00\u6b21\u53d1\u5e03\u5f00\u6e90\u9879\u76ee\uff0c\u8fd8\u4e0d\u592a\u719f\u6089\uff0c\u5982\u6709\u5199\u7684\u4e0d\u597d\u7684\u5730\u65b9\u8fd8\u8bf7\u5404\u4f4d\u5927\u4f6c\u8c05\u89e3\u3002\u5982\u679c\u89c9\u5f97\u8fd9\u4e2a\u9879\u76ee\u6709\u610f\u601d\uff0c\u8bf7\u5e2e\u5fd9\u53bbgithub\u70b9\u4e2astar\uff0c\u8c22\u8c22\u5404\u4f4d\u5927\u4f6c\u4e86\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>kenshuren<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u611f\u8c22\u5206\u4eab\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>30K\u7684K3\u5f88\u6d41\u7545<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7b2c\u4e00\u6b21\u79bb\u5927\u4f6c\u8fd9\u4e48\u8fd1\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5b6b\u7b11\u5ddd<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u524d\u6392\u524d\u6392\uff0c\u7ed1\u5b9a\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ntgoaywh<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u611f\u8c22\u5206\u4eab\uff0c\u7ed1\u5b9a\u5927\u4f6c:lol:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>wumeitianshi<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 wumeitianshi \u4e8e 2020-12-6 00:35 \u7f16\u8f91 <\/p>\n<p> star\u4e86:lol zsbd\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>atmo<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u652f\u6301\u5927\u4f6c\uff0czsbd\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>tomx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\twumeitianshi \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-12-6 00:33<br \/>  star\u4e86 zsbd<\/p>\n<p> \u8c22\u8c22\u5927\u4f6c\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>b66667777<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5e2e\u9876\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>lenchanlhh<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u611f\u8c22\u5df1\u6536\u85cf:lol\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>tomx \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u3010\u5f00\u6e90\u3011&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/215374"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=215374"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/215374\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215374"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}