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:5174", // Admin
|
||||||
"http://localhost:4173",
|
"http://localhost:4173",
|
||||||
"http://localhost:3001", // SSR Next.js
|
"http://localhost:3001", // SSR Next.js
|
||||||
|
"https://react5173.kitizone.com",
|
||||||
|
"https://elysia3051.kitizone.com"
|
||||||
],
|
],
|
||||||
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
|
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
|
||||||
credentials: true,
|
credentials: true,
|
||||||
@@ -88,7 +90,7 @@ const app = new Elysia()
|
|||||||
.group("/api", (app) =>
|
.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)
|
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(
|
console.log(
|
||||||
`🌿 HomAroma API is running at http://${app.server?.hostname}:${app.server?.port}`
|
`🌿 HomAroma API is running at http://${app.server?.hostname}:${app.server?.port}`
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /home/kitisak/Projects/homaroma/apps/mcp-server
|
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" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>website</title>
|
<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>
|
<script src="https://cdn.omise.co/omise.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ export const initLiff = async (liffId: string) => {
|
|||||||
await authenticateWithBackend(profile);
|
await authenticateWithBackend(profile);
|
||||||
} else if (liff.isInClient()) {
|
} else if (liff.isInClient()) {
|
||||||
// เปิดเว็บผ่านเบราว์เซอร์ของ LINE (In-App Browser) แต่ยังไม่ได้ล็อกอิน
|
// เปิดเว็บผ่านเบราว์เซอร์ของ LINE (In-App Browser) แต่ยังไม่ได้ล็อกอิน
|
||||||
// ส่ง redirectUri: window.location.href เพื่อให้หลัง login แล้วกลับมาที่หน้าเดิม
|
liff.login();
|
||||||
liff.login({ redirectUri: window.location.href });
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("LIFF Initialization failed", error);
|
console.error("LIFF Initialization failed", error);
|
||||||
@@ -50,8 +49,7 @@ const authenticateWithBackend = async (profile: any) => {
|
|||||||
|
|
||||||
export const loginLiff = () => {
|
export const loginLiff = () => {
|
||||||
if (!liff.isLoggedIn()) {
|
if (!liff.isLoggedIn()) {
|
||||||
// ส่ง redirectUri เพื่อกลับมาที่หน้าเดิมหลัง login
|
liff.login();
|
||||||
liff.login({ redirectUri: window.location.href });
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"contact": "Contact",
|
"contact": "Contact",
|
||||||
"shopNow": "Shop Now",
|
"shopNow": "Shop Now",
|
||||||
"findMyScent": "Find My Scent ✨",
|
"findMyScent": "Find My Scent ✨",
|
||||||
|
"promotions": "Promotions",
|
||||||
|
"profile": "My Profile",
|
||||||
"search": {
|
"search": {
|
||||||
"title": "Search Collection",
|
"title": "Search Collection",
|
||||||
"placeholder": "Search scents, categories...",
|
"placeholder": "Search scents, categories...",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"contact": "ติดต่อเรา",
|
"contact": "ติดต่อเรา",
|
||||||
"shopNow": "ช้อปเลย",
|
"shopNow": "ช้อปเลย",
|
||||||
"findMyScent": "ค้นหากลิ่นของคุณ ✨",
|
"findMyScent": "ค้นหากลิ่นของคุณ ✨",
|
||||||
|
"promotions": "โปรโมชั่น",
|
||||||
|
"profile": "โปรไฟล์ของฉัน",
|
||||||
"search": {
|
"search": {
|
||||||
"title": "ค้นหาสินค้า",
|
"title": "ค้นหาสินค้า",
|
||||||
"placeholder": "ค้นหากลิ่น, คอลเลกชัน...",
|
"placeholder": "ค้นหากลิ่น, คอลเลกชัน...",
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ export default {
|
|||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Sarabun', 'sans-serif'],
|
||||||
|
heading: ['Prompt', 'sans-serif'],
|
||||||
|
},
|
||||||
colors: {
|
colors: {
|
||||||
pop: {
|
pop: {
|
||||||
pink: "#FF6B6B",
|
pink: "#FF6B6B",
|
||||||
|
|||||||
@@ -4,4 +4,8 @@ import react from '@vitejs/plugin-react'
|
|||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
server: {
|
||||||
|
host: true,
|
||||||
|
allowedHosts: ['react5173.kitizone.com'],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
Reference in new issue
Block a user