Skip to content

Commit

Permalink
changed port 5001 back to 5000
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwillmcleod committed Jan 22, 2024
1 parent 3051258 commit 96cb9e5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion frontend/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_FIREBASE_API_KEY=AIzaSyAVkhnuTBofnvjRXzwB9YmPKzkZm3Pa920
NODE_ENV=production
VITE_ENV=production
2 changes: 1 addition & 1 deletion frontend/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"port": 8080
},
"hosting": {
"port": 5001
"port": 5000
},
"ui": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
updateProfile,
} from "firebase/auth"
import { useNavigate } from "react-router-dom"
import { db } from "../firebase"
import { db } from "../../firebase"
import { setDoc, doc } from "firebase/firestore"
import Button from "@mui/material/Button"
import TextField from "@mui/material/TextField"
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { initializeApp } from "@firebase/app"
import { getAuth, connectAuthEmulator } from "@firebase/auth"
import { getFirestore, connectFirestoreEmulator } from "@firebase/firestore"

// @ts-ignore
const firebaseApiKey = import.meta.env.VITE_FIREBASE_API_KEY

console.log(import.meta.env)

const firebaseConfig = {
apiKey: firebaseApiKey,
authDomain: "uasc-ceebc.firebaseapp.com",
Expand All @@ -21,7 +20,7 @@ const auth = getAuth(app)
const db = getFirestore(app)

// use emulator suite if running locally
if (process.env.NODE_ENV === "development") {
if (import.meta.env.VITE_ENV === "development") {
connectFirestoreEmulator(db, "localhost", 8080)
connectAuthEmulator(auth, "http://localhost:9099")
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Register.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import SignUpForm from "../components/SignUpForm"
import SignUpForm from "../components/sign-up-form/SignUpForm"
import Typography from "@mui/material/Typography"
import Container from "@mui/material/Container"
import Box from "@mui/material/Box"
Expand Down
21 changes: 14 additions & 7 deletions frontend/src/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const { loadEnvConfig } = require("next-env")
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import viteTsconfigPaths from "vite-tsconfig-paths"

const withEnv = () => {
const env = loadEnvConfig(__dirname)
return { env: env.parsed }
}

module.exports = withEnv()
export default defineConfig({
// depending on your application, base can also be "/"
base: "",
plugins: [react(), viteTsconfigPaths()],
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: 3000,
},
})

0 comments on commit 96cb9e5

Please sign in to comment.