show diffs

This commit is contained in:
Chris Wanstrath 2026-02-04 13:29:54 -08:00
parent 9bf3973020
commit 02fca1313c
3 changed files with 13 additions and 0 deletions

View File

@ -46,6 +46,8 @@ app.get("/", (c) => {
app.get("/txt", c => c.text(truism()))
app.get("/ok", c => c.text("ok"))
export default {
port: process.env.PORT || 3000,
fetch: app.fetch,

View File

@ -51,6 +51,9 @@ export async function infoApp(arg?: string) {
console.log(` Port: ${app.port}`)
console.log(` URL: ${makeAppUrl(app.port)}`)
}
if (app.pid) {
console.log(` PID: ${app.pid}`)
}
if (app.started) {
const uptime = Date.now() - app.started
const seconds = Math.floor(uptime / 1000) % 60

View File

@ -89,6 +89,14 @@ export function AppDetail({ app, render }: { app: App, render: () => void }) {
</InfoValue>
</InfoRow>
)}
{app.state === 'running' && app.pid && (
<InfoRow>
<InfoLabel>PID</InfoLabel>
<InfoValue>
{app.pid}
</InfoValue>
</InfoRow>
)}
{app.started && (
<InfoRow>
<InfoLabel>Started</InfoLabel>