forked from xyTom/Url-Shorten-Worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |