1 Commits
v2 ... main

Author SHA1 Message Date
a6e3564779 configurado back para estar expuesto en el mismo endpoint que el front 2025-08-28 19:51:57 -03:00
2 changed files with 9 additions and 4 deletions

View File

@@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
server: {
proxy:{
"/api": "http://localhost:8080"
}
}
}) })

View File

@@ -9,15 +9,15 @@ import authRoutes from './routes/auth'
const bootstrap = async () => { const bootstrap = async () => {
await mongo.connect() await mongo.connect()
app.get('/', (req, res) => { app.get('/api', (req, res) => {
res.status(200).send('Hello, world!') res.status(200).send('Hello, world!')
}) })
app.get('/healthz', (req, res) => { app.get('/api/healthz', (req, res) => {
res.status(204).end() res.status(204).end()
}) })
app.use('/auth', authRoutes) app.use('/api/auth', authRoutes)
// add rest of routes here... // add rest of routes here...
app.listen(PORT, () => { app.listen(PORT, () => {