Skip to content

Commit

Permalink
added biome
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Mar 12, 2024
1 parent 2b3236a commit 25667cc
Show file tree
Hide file tree
Showing 4 changed files with 1,119 additions and 952 deletions.
24 changes: 12 additions & 12 deletions excel/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "excel",
"version": "1.0.0",
"description": "",
"main": "excel.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"read-excel-file": "^5.5.3"
}
"name": "excel",
"version": "1.0.0",
"description": "",
"main": "excel.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"read-excel-file": "^5.5.3"
}
}
20 changes: 13 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ app.use(cors());

app.get("/v1/products", (req, res) => {
// print who IP of the request
const ip = req.headers["x-forwarded-for"] || req.socket.remoteAddress;
const ip = req.headers["x-forwarded-for"] || req.socket.remoteAddress;
console.log(`Request from ${ip}`);
res.sendFile(`${__dirname}/data/products.json`);
});
Expand Down Expand Up @@ -77,9 +77,15 @@ app.listen(port, () => {
console.log(`Listening at http://localhost:${port}`);
});

new CronJob("0 0 3 * * *", () => {
console.log("Updating ALL products");
getAllProducts(productIdMap).then((products) => {
idMap(products);
});
}, null, true, "Europe/Stockholm");
new CronJob(
"0 0 3 * * *",
() => {
console.log("Updating ALL products");
getAllProducts(productIdMap).then((products) => {
idMap(products);
});
},
null,
true,
"Europe/Stockholm",
);
Loading

0 comments on commit 25667cc

Please sign in to comment.