Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaS7 committed Jan 7, 2024
1 parent cc5840c commit 616ec53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/public/login.html"
}
]
},
"emulators": {
Expand All @@ -18,11 +24,5 @@
"enabled": true
},
"singleProjectMode": true
},
"rewrites": [
{
"source": "**",
"destination": "/public/index.html"
}
]
}
}
9 changes: 5 additions & 4 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const cors = require("cors");
const app = express();

app.use(express.static(path.join(__dirname, 'public')));
app.get("/", (req, res) => {
// Redirect to the login.html page
res.redirect("/login.html");
});


app.use(cors({ origin: 'https://chuck-stewart-archive.web.app' }));

Expand All @@ -18,10 +23,6 @@ app.use((err, req, res, next) => {
res.status(500).json({ error: "Internal Server Error", message: err.message });
});

app.get("/", (req, res) => {
// Redirect to the login.html page
res.redirect("/login.html");
});

//Get Record from Databae
app.get("/api/database/search", async (req, res) => {
Expand Down

0 comments on commit 616ec53

Please sign in to comment.