This commit is contained in:
Douglas Barone 2023-10-17 10:06:00 -04:00
parent 63a3c3e4a8
commit 5d11027972
6 changed files with 11 additions and 5 deletions

View File

@ -1 +1 @@
VITE_SERVER_URL=https://cp.pp.ifms.edu.br

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vuetify 3</title> <title>Captive Portal</title>
</head> </head>
<body> <body>

View File

@ -7,4 +7,10 @@ const server = express()
server.use(cors()) server.use(cors())
server.use('/trpc', trpcMiddleware) server.use('/trpc', trpcMiddleware)
server.use('/', express.static('dist/web'))
server.get('*', (req, res) => {
res.sendFile('index.html', { root: 'dist/web' })
})
export { server } export { server }

View File

@ -1,7 +1,7 @@
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client' import { createTRPCProxyClient, httpBatchLink } from '@trpc/client'
import type { AppRouter } from '../server/trpc' 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) console.log('SERVER_URL', SERVER_URL)

View File

@ -15,8 +15,7 @@
"noEmit": true, "noEmit": true,
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]
}, }
"outDir": "./dist/server/"
}, },
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }], "references": [{ "path": "./tsconfig.node.json" }],

View File

@ -8,6 +8,7 @@ import { fileURLToPath, URL } from 'node:url'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
base: './',
plugins: [ plugins: [
vue({ vue({
template: { transformAssetUrls } template: { transformAssetUrls }