Update api for gcloud and fix frontend

This commit is contained in:
Arthur Belleville 2025-06-24 21:56:43 +02:00
parent 14eab2daf6
commit 4949d03628
No known key found for this signature in database
9 changed files with 19 additions and 1404 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,4 +0,0 @@
onlyBuiltDependencies:
- esbuild
- sharp
- workerd

View file

@ -3,7 +3,7 @@ import "dotenv/config";
import { Hono } from "hono";
import { serve } from "@hono/node-server";
import { logger } from "hono/logger";
import { mainRouter } from "./routers";
import { mainRouter } from "./routers.js";
import { cors } from "hono/cors";

View file

@ -1,5 +1,5 @@
import { createClient, User } from "@supabase/supabase-js";
import { Context, Next } from "hono";
import { createClient, type User } from "@supabase/supabase-js";
import type { Context, Next } from "hono";
// Create authentication middleware
export const authMiddleware = async (c: Context, next: Next) => {

View file

@ -1,6 +1,6 @@
import { Hono } from "hono";
import { userRouter } from "./user";
import { supabaseMiddleware } from "./middleware";
import { userRouter } from "./user.js";
import { supabaseMiddleware } from "./middleware.js";
export const mainRouter = new Hono<{
Bindings: {

View file

@ -1,6 +1,6 @@
import { Hono } from "hono";
import { authMiddleware } from "./middleware";
import { User } from "@supabase/supabase-js";
import { authMiddleware } from "./middleware.js";
import type { User } from "@supabase/supabase-js";
import { StreamChat } from "stream-chat";
export const userRouter = new Hono<{

View file

@ -1,14 +1,14 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"module": "NodeNext",
"strict": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"lib": [
"ESNext"
],
"types": ["node"],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
"jsxImportSource": "hono/jsx",
"outDir": "./dist"
},
}
"exclude": ["node_modules"]
}

View file

@ -4,7 +4,9 @@ import { IS_DEV } from "@ui/config";
// Create axios instance with default config
export const api = axios.create({
baseURL: IS_DEV ? "http://127.0.0.1:8080" : "https://api.xtablo.com",
baseURL: IS_DEV
? "http://127.0.0.1:8080"
: "https://xablo-api-636270553187.europe-west1.run.app",
headers: {
"Content-Type": "application/json",
},

2
ui/vite.config.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
declare const _default: import("vite").UserConfig;
export default _default;