From 02549ae97a813a2326d7628398fced33582af8de Mon Sep 17 00:00:00 2001 From: Space Date: Sat, 30 Aug 2025 13:42:01 +0200 Subject: [PATCH] Remove unused script tag from Layout component, add docker-compose and pnpm workspace configuration --- app/root.tsx | 1 - app/routes/_index.tsx | 27 --------------------------- docker-compose.yml | 17 +++++++++++++++++ pnpm-workspace.yaml | 2 ++ 4 files changed, 19 insertions(+), 28 deletions(-) create mode 100644 docker-compose.yml create mode 100644 pnpm-workspace.yaml diff --git a/app/root.tsx b/app/root.tsx index 1a70950..b1133a0 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -17,7 +17,6 @@ export function Layout({ children }: { children: React.ReactNode }) { - diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 76dbcc5..2a7a21e 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -14,35 +14,8 @@ export const meta: MetaFunction = () => { ]; }; -interface BlogPost { - id: string; - title: string; - excerpt: string; - date: string; - access: string; // Where its located in the folder - tags: string[]; - hide_date?: boolean; -} - -export async function loader() { - const posts: BlogPost[] = [ - { - id: "1", - title: "My First Post", - excerpt: "Yeah, as it says, this is my first post.", - date: "2024-01-23", - access: "myfirstpost", - tags: ["Hello, World!"], - hide_date: true, - }, - // Add more posts here - ]; - - return json({ posts }); -} export default function Index() { - const { posts } = useLoaderData(); const [status, setStatus] = useState(""); const [border_status, setBorderStatus] = useState("border-gray-700"); diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..938b601 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + app: + image: node:22 + working_dir: /app + volumes: + - .:/app + ports: + - "6756:6756" + command: > + sh -c " + npm i -g pnpm && + pnpm install && + pnpm build && + PORT=6756 pnpm start + " \ No newline at end of file diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..efc037a --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +onlyBuiltDependencies: + - esbuild