# page-spy-api **Repository Path**: pagespy/page-spy-api ## Basic Information - **Project Name**: page-spy-api - **Description**: ⚡️ PageSpy 的服务端。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-10-17 - **Last Updated**: 2025-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [main-repo]: https://github.com/HuolalaTech/page-spy-web [api-ver-img]: https://img.shields.io/github/v/tag/HuolalaTech/page-spy-api?label=version [api-ver-url]: https://github.com/HuolalaTech/page-spy-api/tags [api-go-img]: https://img.shields.io/github/go-mod/go-version/HuolalaTech/page-spy-api?label=go [api-go-url]: https://github.com/HuolalaTech/page-spy-api/blob/master/go.mod

Page Spy API

PageSpy 是一款远程调试网页的工具。

[![API Version][api-ver-img]][api-ver-url] [![Go Version][api-go-img]][api-go-url] PageSpy - Remote debugging as seamless as local debugging. | Product Hunt PageSpy - Remote debugging as seamless as local debugging. | Hacker News [English](./README.md) | 中文
## 简介 该仓库是 [HuolalaTech/page-spy-web][main-repo] 的后端服务,其中包括静态资源服务,http 服务以及 websocket 服务。 ## 如何使用 ```golang package main import ( "embed" "log" "github.com/HuolalaTech/page-spy-api/config" "github.com/HuolalaTech/page-spy-api/container" "github.com/HuolalaTech/page-spy-api/serve" ) //go:embed dist/* var publicContent embed.FS func main() { container := container.Container() err := container.Provide(func() *config.StaticConfig { // page-spy-web 构建 dist 结构静态资源代理,如果只使用后端可以 return nil return &config.StaticConfig{ DirName: "dist", Files: publicContent, } }) if err != nil { log.Fatal(err) } serve.Run() } ``` ## 目录结构 - config 项目配置 - container 依赖注入 - event 事件结构定义 - logger 日志接口 - metric 打点接口 - room 房间接口 - rpc 多机器 rpc 接口 - serve http websocket 服务