constorigin=(process.env.NEXT_PUBLIC_APP_URL||"http://localhost:8088").replace(/\/$/,"");constposts=db.prepare("SELECT p.id,p.content,COALESCE(p.remote_created_at,p.created_at) AS published_at,u.username FROM posts p JOIN users u ON u.id=p.author_id WHERE p.visibility='PUBLIC' AND p.hidden=0 ORDER BY COALESCE(p.remote_created_at,p.created_at) DESC LIMIT 50").all()as{id: number;content: string;published_at: string;username: string}[];constupdated=posts[0]?newDate(posts[0].published_at).toISOString():newDate().toISOString();