Update api for gcloud and fix frontend
This commit is contained in:
parent
14eab2daf6
commit
4949d03628
9 changed files with 19 additions and 1404 deletions
1385
api/pnpm-lock.yaml
1385
api/pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +0,0 @@
|
|||
onlyBuiltDependencies:
|
||||
- esbuild
|
||||
- sharp
|
||||
- workerd
|
||||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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<{
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
2
ui/vite.config.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
declare const _default: import("vite").UserConfig;
|
||||
export default _default;
|
||||
Loading…
Reference in a new issue