diff --git a/.env.production b/.env.production
index dd443a3..8b13789 100644
--- a/.env.production
+++ b/.env.production
@@ -1 +1 @@
-VITE_SERVER_URL=https://cp.pp.ifms.edu.br
+
diff --git a/index.html b/index.html
index a722dc5..87cb237 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vuetify 3
+ Captive Portal
diff --git a/src/server/server.ts b/src/server/server.ts
index 016f6ef..9d36e58 100644
--- a/src/server/server.ts
+++ b/src/server/server.ts
@@ -7,4 +7,10 @@ const server = express()
server.use(cors())
server.use('/trpc', trpcMiddleware)
+server.use('/', express.static('dist/web'))
+
+server.get('*', (req, res) => {
+ res.sendFile('index.html', { root: 'dist/web' })
+})
+
export { server }
diff --git a/src/web/trpc.ts b/src/web/trpc.ts
index c2d69ec..c833fcf 100644
--- a/src/web/trpc.ts
+++ b/src/web/trpc.ts
@@ -1,7 +1,7 @@
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client'
import type { AppRouter } from '../server/trpc'
-const SERVER_URL = import.meta.env.VITE_SERVER_URL || 'http://localhost:80'
+const SERVER_URL = import.meta.env.VITE_SERVER_URL || ''
console.log('SERVER_URL', SERVER_URL)
diff --git a/tsconfig.json b/tsconfig.json
index 423a164..bb82a89 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,8 +15,7 @@
"noEmit": true,
"paths": {
"@/*": ["src/*"]
- },
- "outDir": "./dist/server/"
+ }
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }],
diff --git a/vite.config.ts b/vite.config.ts
index 7e481c0..647ccd2 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -8,6 +8,7 @@ import { fileURLToPath, URL } from 'node:url'
// https://vitejs.dev/config/
export default defineConfig({
+ base: './',
plugins: [
vue({
template: { transformAssetUrls }