Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xyTom authored Dec 5, 2020
1 parent e680d19 commit 69072d6
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
# Url-Shorten-Worker
A URL Shortener created using Cloudflare worker
A URL Shortener created using Cloudflare Worker

# Getting start
去Workers KV中创建一个命名空间

Go to Workers KV and create a namespace.

![KV Namespace](https://cdn.jsdelivr.net/npm/[email protected]/20201205232805.png)

去Worker的Settings选选项卡中绑定KV Namespace

Bind an instance of a KV Namespace to access its data in a Worker.

![Bind KV Namespace](https://cdn.jsdelivr.net/npm/[email protected]/20201205232536.png)

其中Variable name填写`LINKS`, KV namespace填写你刚刚创建的命名空间

Where Variable name should set as `LINKS` and KV namespace is the namespace you just created in the first step.

![Bind KV Namespace](https://cdn.jsdelivr.net/npm/[email protected]/20201205232704.png)

复制本项目中的`index.js`的代码到Cloudlare Worker

Copy the `index.js` code from this project to Cloudlare Worker.

点击Save and Deploy

Click Save and Deploy

# Demo
https://5it.me

0 comments on commit 69072d6

Please sign in to comment.