improvement for deplyment to cloud

This commit is contained in:
Vadher
2026-07-19 15:48:57 +05:30
parent b4c54c0309
commit 803efec35a
8 changed files with 16897 additions and 165682 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
const fs = require("node:fs").promises;
const url_path = "./database/db.json";
const path = require("path");
const url_path = path.join(__dirname, "../database", "db.json");
const StoreRecord = async (urlRecord) => {
try {
+1 -6
View File
@@ -1,6 +1,5 @@
const axios = require("axios");
const fs = require("fs").promises;
const path = require("path");
const normalizeUrl = require("../utils/utils").normalizeUrl;
async function checkUrl(url) {
@@ -8,11 +7,7 @@ async function checkUrl(url) {
try {
const start = Date.now();
const response = await axios.get(target, {
timeout: 10000,
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",
},
timeout: 10000
});
const responseTime = Date.now() - start;
+2 -1
View File
@@ -1,5 +1,6 @@
const fs = require("node:fs").promises;
const url_path = "./database/urls.json";
const path = require("path");
const url_path = path.join(__dirname, "../database", "urls.json");
const addUrl = async (url) => {
try {