mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-25 17:37:19 +00:00
Fix ESM imports with .js extensions for Vercel
This commit is contained in:
parent
1429beb80e
commit
ef323d9016
5 changed files with 9 additions and 9 deletions
|
|
@ -5,10 +5,10 @@ dotenv.config({ path: './.env' });
|
||||||
|
|
||||||
import express, { type Request, Response, NextFunction } from "express";
|
import express, { type Request, Response, NextFunction } from "express";
|
||||||
import session from "express-session";
|
import session from "express-session";
|
||||||
import { registerRoutes } from "./routes";
|
import { registerRoutes } from "./routes.js";
|
||||||
import { serveStatic } from "./static";
|
import { serveStatic } from "./static.js";
|
||||||
import { createServer } from "http";
|
import { createServer } from "http";
|
||||||
import { setupWebSocket } from "./websocket";
|
import { setupWebSocket } from "./websocket.js";
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const httpServer = createServer(app);
|
const httpServer = createServer(app);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import OpenAI from "openai";
|
import OpenAI from "openai";
|
||||||
import { storage } from "./storage";
|
import { storage } from "./storage.js";
|
||||||
|
|
||||||
// This is using Replit's AI Integrations service, which provides OpenAI-compatible API access without requiring your own OpenAI API key.
|
// This is using Replit's AI Integrations service, which provides OpenAI-compatible API access without requiring your own OpenAI API key.
|
||||||
// the newest OpenAI model is "gpt-5" which was released August 7, 2025. do not change this unless explicitly requested by the user
|
// the newest OpenAI model is "gpt-5" which was released August 7, 2025. do not change this unless explicitly requested by the user
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import type { Express, Request, Response, NextFunction } from "express";
|
import type { Express, Request, Response, NextFunction } from "express";
|
||||||
import { createServer, type Server } from "http";
|
import { createServer, type Server } from "http";
|
||||||
import { storage } from "./storage";
|
import { storage } from "./storage.js";
|
||||||
import { loginSchema, signupSchema } from "@shared/schema";
|
import { loginSchema, signupSchema } from "@shared/schema";
|
||||||
import { supabase } from "./supabase";
|
import { supabase } from "./supabase.js";
|
||||||
import { getChatResponse } from "./openai";
|
import { getChatResponse } from "./openai.js";
|
||||||
|
|
||||||
// Extend session type
|
// Extend session type
|
||||||
declare module 'express-session' {
|
declare module 'express-session' {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { type Profile, type Project, type ChatMessage } from "@shared/schema";
|
import { type Profile, type Project, type ChatMessage } from "@shared/schema";
|
||||||
import { supabase } from "./supabase";
|
import { supabase } from "./supabase.js";
|
||||||
|
|
||||||
export interface IStorage {
|
export interface IStorage {
|
||||||
// Profiles
|
// Profiles
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Server } from "http";
|
import { Server } from "http";
|
||||||
import { Server as SocketIOServer } from "socket.io";
|
import { Server as SocketIOServer } from "socket.io";
|
||||||
import { getAlerts, getNotifications } from "./storage";
|
import { getAlerts, getNotifications } from "./storage.js";
|
||||||
|
|
||||||
export function setupWebSocket(httpServer: Server) {
|
export function setupWebSocket(httpServer: Server) {
|
||||||
const io = new SocketIOServer(httpServer, {
|
const io = new SocketIOServer(httpServer, {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue