I'm trying to run this Single Page Application in node.js + express.js but I can only load the html file and not the required 2 JavaScript files.

weather.js
const { Router } = require("express");
const controller = require("./controller");
const path = require("path");
const router = new Router();
router.get("/home", (req, res) => {
res.sendFile(path.join(__dirname, "public", "home.html"));
});
router.post(
"/district/",
[controller.auther, controller.admin],
controller.addDistrict
);
router.post(
"/data/",
[controller.auther, controller.editor],
controller.addData
);
router.get("/", [controller.auther, controller.viewer], controller.getData);
router.post("/auth", controller.auth);
module.exports = router;
server.js
const express = require("express");
const weatherRoutes = require("./src/weather");
const path = require("path");
const app = express();
const port = 3000;
app.use(express.json());
app.use(express.static(path.join(__dirname, "public")));
app.use("/api/weather", weatherRoutes);
app.listen(port, () => console.log(`App listening on port ${port}`));
home.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello World</title>
</head>
<body>
<div id="map"></div>
<script type="text/javascript" src="countrymap.js"></script>
<script type="text/javascript" src="mapdata.js"></script>
</body>
</html>
Tried change the file locations of the js files.

Try adding base tag to
home.html