No-account debugging fixture
Preferences
Requests one example setting from a local endpoint.
// Save as preferences-fixture.cjs, then run: node preferences-fixture.cjs const http = require('node:http'); const server = http.createServer((req, res) => { const { pathname, searchParams } = new URL(req.url, 'http://localhost'); if (pathname === '/api/preferences') { res.writeHead(200, { 'Content-Type': 'application/json' }); return res.end(JSON.stringify({ theme: 'light' })); } if (pathname !== '/') { res.writeHead(404, { 'Content-Type': 'application/json' }); return res.end(JSON.stringify({ error: 'unknown route' })); } const endpoint = searchParams.get('stage') === 'after' ? '/api/preferences' : '/api/prefences'; res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(`
No-account debugging fixture
Requests one example setting from a local endpoint.