chore: prepare geo agent mvp for merge
This commit is contained in:
@@ -139,6 +139,39 @@ npm run d1:migrate:production
|
||||
npm run deploy:worker:production
|
||||
```
|
||||
|
||||
## FRP Mainland Access Tunnel
|
||||
|
||||
The Cloudflare staging URL can be unreachable from mainland networks. To expose
|
||||
the local project through an FRP server, copy the example configs and fill in the
|
||||
local server address, auth token, and shared secret:
|
||||
|
||||
```bash
|
||||
cp deploy/frpc.geo-agent-article-optimizer.example.toml deploy/frpc.geo-agent-article-optimizer.toml
|
||||
cp deploy/frpc.geo-agent-article-optimizer-visitor.example.toml deploy/frpc.geo-agent-article-optimizer-visitor.toml
|
||||
```
|
||||
|
||||
The real `deploy/*.toml` files are ignored by Git so local credentials stay out
|
||||
of the public repository.
|
||||
|
||||
Run the app locally and start frpc with the project config:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
frpc -c deploy/frpc.geo-agent-article-optimizer.toml
|
||||
```
|
||||
|
||||
The project-side frpc config publishes local `127.0.0.1:3000` as the stcp
|
||||
service `geo_agent_article_optimizer`.
|
||||
|
||||
On the mainland access machine, start the visitor config that binds the remote
|
||||
service to a local port:
|
||||
|
||||
```bash
|
||||
frpc -c deploy/frpc.geo-agent-article-optimizer-visitor.toml
|
||||
```
|
||||
|
||||
Then open `http://127.0.0.1:6009` on that machine.
|
||||
|
||||
## Exports
|
||||
|
||||
Local generated files are written under:
|
||||
|
||||
Reference in New Issue
Block a user