Skip to content

API 总览

Geofront 的 TypeScript API 通过命名空间 Geofront 与类 GeofrontProxy 暴露。

快速导航

最小示例

ts
import { Geofront } from 'geofront-ts'

const proxy = Geofront.createProxy()
proxy.setRouter(ctx => ({ target: { host: '127.0.0.1', port: 25565 } }))
await proxy.listen({ host: '0.0.0.0', port: 25565 })

继续阅读: 核心类 | 类型与事件 | 工具函数

Released under the MIT License.