Skip to content

Latest commit

 

History

History
122 lines (80 loc) · 2.94 KB

setup_guide.md

File metadata and controls

122 lines (80 loc) · 2.94 KB

Setup Guide

Register Cloudflare Account

If you already have an account, goto Create Worker

Visit Cloudflare Website, Click Sign Up, Register an Account

Create Worker

After Sign Up or Login, Click Workers & PagesOverViewCreate 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

Create Database

Click Workers & PagesD1 or KVCreate

Fill a name and Click Save

Bind Database

Click Workers & PagesOverViewThe Worker You Just Created

Then Click SettingsVariables

Click D1 Database Bindings or KV Namesapce Bindings Base on D1 or KV Version

Then Click Edit VariablesAdd Binding

Select the Namespace and Name it as database

Then Click Save

Caution

The name MUST be database, Otherwise, Worker will throw exception

Database Initialize

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

Register

Now you can use Bark APP to add the Server, or you can use curl or browser to test the server