bradtraversy / mern-tutorial

Goalsetter application from Youtube series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurations for Vitejs

kabir0x23 opened this issue · comments

commented

add the below code in the vite.config.js

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
  server: {
    proxy: {
        "/api": "http://localhost:5000",
    },

// to serve on the 3000 port  
    host: '0.0.0.0',
    port: 3000,
  },
  plugins: [react()],
})