show diffs
This commit is contained in:
parent
9bf3973020
commit
02fca1313c
|
|
@ -46,6 +46,8 @@ app.get("/", (c) => {
|
||||||
|
|
||||||
app.get("/txt", c => c.text(truism()))
|
app.get("/txt", c => c.text(truism()))
|
||||||
|
|
||||||
|
app.get("/ok", c => c.text("ok"))
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
port: process.env.PORT || 3000,
|
port: process.env.PORT || 3000,
|
||||||
fetch: app.fetch,
|
fetch: app.fetch,
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ export async function infoApp(arg?: string) {
|
||||||
console.log(` Port: ${app.port}`)
|
console.log(` Port: ${app.port}`)
|
||||||
console.log(` URL: ${makeAppUrl(app.port)}`)
|
console.log(` URL: ${makeAppUrl(app.port)}`)
|
||||||
}
|
}
|
||||||
|
if (app.pid) {
|
||||||
|
console.log(` PID: ${app.pid}`)
|
||||||
|
}
|
||||||
if (app.started) {
|
if (app.started) {
|
||||||
const uptime = Date.now() - app.started
|
const uptime = Date.now() - app.started
|
||||||
const seconds = Math.floor(uptime / 1000) % 60
|
const seconds = Math.floor(uptime / 1000) % 60
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,14 @@ export function AppDetail({ app, render }: { app: App, render: () => void }) {
|
||||||
</InfoValue>
|
</InfoValue>
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
)}
|
)}
|
||||||
|
{app.state === 'running' && app.pid && (
|
||||||
|
<InfoRow>
|
||||||
|
<InfoLabel>PID</InfoLabel>
|
||||||
|
<InfoValue>
|
||||||
|
{app.pid}
|
||||||
|
</InfoValue>
|
||||||
|
</InfoRow>
|
||||||
|
)}
|
||||||
{app.started && (
|
{app.started && (
|
||||||
<InfoRow>
|
<InfoRow>
|
||||||
<InfoLabel>Started</InfoLabel>
|
<InfoLabel>Started</InfoLabel>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user