Something went wrong. Try again.
forked from nandi.uk/gitproxy
Something went wrong. Try again.
12345678910111213141516171819202122232425262728import { Container } from '@cloudflare/containers'
export class AppviewContainer extends Container { defaultPort = 8787 sleepAfter = '10m'}
function healthResponse() { return new Response('ok\n', { status: 200, headers: { 'content-type': 'text/plain; charset=utf-8' }, })}
export default { async fetch(request, env) { const url = new URL(request.url)
if (url.pathname === '/healthz') { return healthResponse() }
const container = env.APPVIEW.getByName('atgit') await container.startAndWaitForPorts({ ports: 8787 }) return container.fetch(request) },}