diff --git a/client/vite.config.ts b/client/vite.config.ts index 5a33944..589967e 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -1,7 +1,11 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], -}) + server: { + host: "0.0.0.0", + port: 5173, + }, +}); diff --git a/server/index.js b/server/index.js index 85f3350..2bc7b6a 100644 --- a/server/index.js +++ b/server/index.js @@ -14,7 +14,7 @@ let PORT = process.env.APP_PORT; app.use( cors({ - origin: process.env.CLIENT_URL, + origin: [process.env.CLIENT_URL, "http://localhost:5173"], }) ); @@ -55,8 +55,8 @@ app.use("/user-vouchers", uservoucher); db.sequelize .sync({ alter: true }) .then(() => { - app.listen(PORT, () => { - console.log(`ecoconnect server running at http://localhost:${PORT}/`); + app.listen(PORT, "0.0.0.0", () => { + console.log(`ecoconnect server running at http://0.0.0.0:${PORT}/`); }); }) .catch((err) => {