Skip to content

Deployment

Staexoctor consists of two parts:

  • Server-side
  • Client-side

Both parts require deployment on Cloudflare Worker

Server-side

1. Create a Worker

Go to Compute -> Workers and Pages -> Create application, then select Start from Hello World!

Fill in the Worker name, then click Deploy

Click Edit code, copy all the content from index.js in the project directory worker

Then click Deploy

2. Add Environment Variables (Optional)

Click Environment variables -> Add variable, add ALLOWED_ORIGIN with the value of your client address, e.g., https://your-domain.com

Note: If you are using localhost, use http://localhost:3000, otherwise an error will occur

Client-side

1. Fork this project

Go to Github to fork the project

2. Modify Configuration

Go to your forked project, modify the __API_URL__ option in the vite.config.js file, change it to your server address

3. Deploy

Go to Cloudflare, click Compute -> Workers and Pages -> Create application, then select Continue With Github or Connect Github

If you have never linked GitHub before, you will see Connect Github, just link it

Then select the project you just forked and click Next

Modify the project name, click Deploy, and wait for the deployment to complete