diff --git a/apps/backend/src/index.ts b/apps/backend/src/index.ts
index 4312425..3ed23a0 100644
--- a/apps/backend/src/index.ts
+++ b/apps/backend/src/index.ts
@@ -38,6 +38,8 @@ const app = new Elysia()
"http://localhost:5174", // Admin
"http://localhost:4173",
"http://localhost:3001", // SSR Next.js
+ "https://react5173.kitizone.com",
+ "https://elysia3051.kitizone.com"
],
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
credentials: true,
@@ -88,7 +90,7 @@ const app = new Elysia()
.group("/api", (app) =>
app.use(authRoute).use(categoriesRoute).use(productsRoute).use(uploadRoute).use(heroRoute).use(ordersRoute).use(settingsRoute).use(articlesRoute).use(tiktokRoute).use(rawMaterialsRoute).use(shopeeRoute).use(tiktokOrderRoute).use(lazadaOrderRoute).use(customersRoute).use(couponsRoute).use(reviewsRoute).use(promotionsRoute).use(pagesRoute).use(paymentsRoute).use(profileRoute)
)
- .listen(PORT);
+ .listen({ port: PORT, hostname: "0.0.0.0" });
console.log(
`🌿 HomAroma API is running at http://${app.server?.hostname}:${app.server?.port}`
diff --git a/apps/mcp-server/run.sh b/apps/mcp-server/run.sh
index b665306..8da8183 100755
--- a/apps/mcp-server/run.sh
+++ b/apps/mcp-server/run.sh
@@ -1,3 +1,3 @@
#!/bin/bash
cd /home/kitisak/Projects/homaroma/apps/mcp-server
-bun run index.ts
+/home/kitisak/.bun/bin/bun run index.ts
diff --git a/apps/spa/index.html b/apps/spa/index.html
index 5c8c238..6ea120b 100644
--- a/apps/spa/index.html
+++ b/apps/spa/index.html
@@ -5,6 +5,9 @@
website
+
+
+
diff --git a/apps/spa/src/lib/liff.ts b/apps/spa/src/lib/liff.ts
index 8a6ff33..a39e428 100644
--- a/apps/spa/src/lib/liff.ts
+++ b/apps/spa/src/lib/liff.ts
@@ -13,8 +13,7 @@ export const initLiff = async (liffId: string) => {
await authenticateWithBackend(profile);
} else if (liff.isInClient()) {
// เปิดเว็บผ่านเบราว์เซอร์ของ LINE (In-App Browser) แต่ยังไม่ได้ล็อกอิน
- // ส่ง redirectUri: window.location.href เพื่อให้หลัง login แล้วกลับมาที่หน้าเดิม
- liff.login({ redirectUri: window.location.href });
+ liff.login();
}
} catch (error) {
console.error("LIFF Initialization failed", error);
@@ -50,8 +49,7 @@ const authenticateWithBackend = async (profile: any) => {
export const loginLiff = () => {
if (!liff.isLoggedIn()) {
- // ส่ง redirectUri เพื่อกลับมาที่หน้าเดิมหลัง login
- liff.login({ redirectUri: window.location.href });
+ liff.login();
}
};
diff --git a/apps/spa/src/locales/en/translation.json b/apps/spa/src/locales/en/translation.json
index 74cdb01..71251cd 100644
--- a/apps/spa/src/locales/en/translation.json
+++ b/apps/spa/src/locales/en/translation.json
@@ -10,6 +10,8 @@
"contact": "Contact",
"shopNow": "Shop Now",
"findMyScent": "Find My Scent ✨",
+ "promotions": "Promotions",
+ "profile": "My Profile",
"search": {
"title": "Search Collection",
"placeholder": "Search scents, categories...",
diff --git a/apps/spa/src/locales/th/translation.json b/apps/spa/src/locales/th/translation.json
index 5777278..b22bbd1 100644
--- a/apps/spa/src/locales/th/translation.json
+++ b/apps/spa/src/locales/th/translation.json
@@ -10,6 +10,8 @@
"contact": "ติดต่อเรา",
"shopNow": "ช้อปเลย",
"findMyScent": "ค้นหากลิ่นของคุณ ✨",
+ "promotions": "โปรโมชั่น",
+ "profile": "โปรไฟล์ของฉัน",
"search": {
"title": "ค้นหาสินค้า",
"placeholder": "ค้นหากลิ่น, คอลเลกชัน...",
diff --git a/apps/spa/tailwind.config.js b/apps/spa/tailwind.config.js
index dbc7927..949739f 100644
--- a/apps/spa/tailwind.config.js
+++ b/apps/spa/tailwind.config.js
@@ -6,6 +6,10 @@ export default {
],
theme: {
extend: {
+ fontFamily: {
+ sans: ['Sarabun', 'sans-serif'],
+ heading: ['Prompt', 'sans-serif'],
+ },
colors: {
pop: {
pink: "#FF6B6B",
diff --git a/apps/spa/vite.config.ts b/apps/spa/vite.config.ts
index 8b0f57b..c968be7 100644
--- a/apps/spa/vite.config.ts
+++ b/apps/spa/vite.config.ts
@@ -4,4 +4,8 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
+ server: {
+ host: true,
+ allowedHosts: ['react5173.kitizone.com'],
+ },
})