testing generic deploy

This commit is contained in:
Devin Zuczek
2026-06-29 21:52:50 -04:00
parent 3affabd280
commit 69b89e2dc4
79 changed files with 399 additions and 307 deletions
+3 -2
View File
@@ -8,9 +8,10 @@ import endpoints from '../static/endpoints.json'
import type { App } from './context'
/**
* Name-server / service-discovery worker served at the apex `rec.djdevin.net`.
* Name-server / service-discovery worker served at the apex domain.
* Returns the endpoints document the game client fetches to discover every
* service host. Static for now — this will be generated dynamically later.
* service host. Generated from `env.json` by `runx sync` — run it after
* changing the domain (see `apps/ns/static/endpoints.json`).
*/
const app = new Hono<App>()
.use(
+4 -5
View File
@@ -2,17 +2,16 @@ import { exports } from 'cloudflare:workers'
import { describe, expect, test } from 'vitest'
import '../../ns.app'
import endpoints from '../../../static/endpoints.json'
const ORIGIN = 'https://ns.rec.djdevin.net'
const ORIGIN = 'https://example.com'
describe('ns endpoints', () => {
test('GET / returns the endpoints document', async () => {
const res = await exports.default.fetch(`${ORIGIN}/`)
expect(res.status).toBe(200)
const body = (await res.json()) as Record<string, string>
expect(body.API).toBe('https://api.rec.djdevin.net')
expect(body.Notifications).toBe('https://notify.rec.djdevin.net')
expect(body.Econ).toBe('https://econ.rec.djdevin.net')
const body = await res.json()
expect(body).toEqual(endpoints)
})
test('unknown path returns 404', async () => {