Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit ecd5d854 authored by 65160111's avatar 65160111
Browse files

Initial commit

parent d4e9bf62
No related branches found
No related tags found
No related merge requests found
node_modules
.env
uploads
*.log
const API_URL = "http://localhost:5000/api";
const API_URL = "http://localhost:8080/api";
// 🔹 Login
function login() {
......
......@@ -75,7 +75,7 @@ router.get("/", authMiddleware, (req, res) => {
results.forEach(report => {
if (report.image_url) {
report.image_url = `http://localhost:5000${report.image_url}`;
report.image_url = `http://localhost:8080${report.image_url}`;
}
});
......@@ -102,7 +102,7 @@ router.get("/:id", authMiddleware, (req, res) => {
const report = results[0];
if (report.image_url) {
report.image_url = `http://localhost:5000${report.image_url}`;
report.image_url = `http://localhost:8080 ${report.image_url}`;
}
res.json(report);
......
......@@ -21,5 +21,5 @@ app.use("/api/reports", require("./routes/reports"));
app.use("/uploads", express.static("uploads"));
// 📌 กำหนด PORT
const PORT = 5000;
const PORT = 8080;
app.listen(PORT, () => console.log(`🚀 Server running on port ${PORT}`));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment