If you already have an account, goto Create Worker
Visit Cloudflare Website, Click Sign Up, Register an Account
After Sign Up or Login, Click Workers & Pages
→ OverView
→ Create Worker
Then Click Deploy
Then Click Edit Code
Copy Code From main.js or main_kv.js and Paste It
If it's First Deploy and Has no Device in Database, Modify isAllowNewDevice
to true
in order to allow Registeration
Then Click Save
Click Workers & Pages
→ D1
or KV
→ Create
Fill a name and Click Save
Click Workers & Pages
→ OverView
→ The Worker You Just Created
Then Click Settings
→ Variables
Click D1 Database Bindings
or KV Namesapce Bindings
Base on D1 or KV Version
Then Click Edit Variables
→ Add Binding
Select the Namespace and Name it as database
Then Click Save
Caution
The name MUST be database
, Otherwise, Worker will throw exception
If you are using KV Version, goto Register
After Modify isAllowQueryNums
to ture
, Send Request on path /info
If you see Response includes devices: 0
, the Deploy is Succeed
Now you can use Bark APP to add the Server, or you can use curl or browser to test the server