Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
andifahruddinakas committed Oct 24, 2024
1 parent 1eaf3c8 commit 1921edf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ app.get("/api/desa/:kodedesa/:tahun", (req, res) => {
const { kodedesa, tahun } = req.params;

// Define the path to the JSON file
// file .json pada folder public/api/kode_desa/tahun
const filePath = path.join(__dirname, "public", "api", kodedesa, tahun, "file.json");
// file .json pada folder public/api/kode_desa/tahun.json
const filePath = path.join(__dirname, "public", "api", kodedesa, tahun + ".json");

// Read the JSON file
fs.readFile(filePath, "utf8", (err, data) => {
Expand Down

0 comments on commit 1921edf

Please sign in to comment.