diff --git a/packages/vanilla/server.js b/packages/vanilla/server.js index 67f03afa..650edabe 100644 --- a/packages/vanilla/server.js +++ b/packages/vanilla/server.js @@ -1,34 +1,84 @@ +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import express from "express"; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const prod = process.env.NODE_ENV === "production"; const port = process.env.PORT || 5173; const base = process.env.BASE || (prod ? "/front_7th_chapter4-1/vanilla/" : "/"); -const app = express(); - -const render = () => { - return `
상품 정보를 불러오는 중...
-${brand}
-같은 카테고리의 다른 상품들
-상품 정보를 불러오는 중...
+같은 카테고리의 다른 상품들
+${brand}
+