x
This commit is contained in:
1 parent
6cfe39b1ff
commit
c1c3a43d7d
8 files changed
+21
-6
No files matched your search
@@ -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}`
|
||||
|
||||
@@ -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
|
||||
@@ -5,6 +5,9 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>website</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet">
|
||||
<script src="https://cdn.omise.co/omise.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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...",
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
"contact": "ติดต่อเรา",
|
||||
"shopNow": "ช้อปเลย",
|
||||
"findMyScent": "ค้นหากลิ่นของคุณ ✨",
|
||||
"promotions": "โปรโมชั่น",
|
||||
"profile": "โปรไฟล์ของฉัน",
|
||||
"search": {
|
||||
"title": "ค้นหาสินค้า",
|
||||
"placeholder": "ค้นหากลิ่น, คอลเลกชัน...",
|
||||
|
||||
@@ -6,6 +6,10 @@ export default {
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Sarabun', 'sans-serif'],
|
||||
heading: ['Prompt', 'sans-serif'],
|
||||
},
|
||||
colors: {
|
||||
pop: {
|
||||
pink: "#FF6B6B",
|
||||
|
||||
@@ -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'],
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user